{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}\\micro.intra\Projekt\P0934$\P0934_Gem\Data Files\Kolfu.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}16 Jan 2024, 14:08:41
{txt}
{com}. *Open and clean the survey data
. odbc load, exec("select * from Kolfu17_20171212del1och2") dsn("P0934") clear
{txt}
{com}. 
. collapse (firstnm)  Q01- v51_Tilltradesdatumvaldag_1, by(P0934_Lopnr_PersonNr)
{res}{txt}
{com}. ren P0934_Lopnr_PersonNr p_id
{res}{txt}
{com}. save "Kolfu survey", replace 
{txt}{p 0 4 2}
file {bf}
Kolfu survey.dta{rm}
saved
{p_end}

{com}. 
. *Create data set with the number of periods previously nominated for office
. use "\\micro.intra\Projekt\P0934$\P0934_Gem\Data Files\nom_ko_94_82.dta" , clear
{txt}
{com}. destring ar ,replace force
{txt}ar: all characters numeric; {res}replaced {txt}as {res}int
{txt}
{com}. append using "\\micro.intra\Projekt\P0934$\P0934_Gem\Data Files\nom_ko_98_14.dta"
{txt}{p 0 7 2}
(variable
{bf:ar} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{com}. duplicates drop P0934_Lopnr_personnr ar, force

{p 0 4}{txt}Duplicates in terms of {res} P0934_Lopnr_personnr ar{p_end}

{txt}(34,787 observations deleted)

{com}. ren P0934_Lopnr_personnr p_id
{res}{txt}
{com}. destring partikod, replace force
{txt}partikod: all characters numeric; {res}replaced {txt}as {res}int
{txt}
{com}. gen pk_2014b=partikod if ar==2014
{txt}(33,158 missing values generated)

{com}. bysort p_id: egen pk_2014=max(pk_2014b) 
{txt}(933 missing values generated)

{com}. gen nom_prev=1 if partikod==pk_2014 & partikod!=.
{txt}(2,681 missing values generated)

{com}. replace nom_prev=0 if ar==2014
{txt}(12,962 real changes made)

{com}. collapse (sum) nom_prev, by(p_id) 
{res}{txt}
{com}.  
. save "\\micro.intra\Projekt\P0934$\P0934_Gem\Data Files\nom_prev.dta" , replace
{txt}{p 0 4 2}
file {bf}
\\micro.intra\Projekt\P0934$\P0934_Gem\Data Files\nom_prev.dta{rm}
saved
{p_end}

{com}. 
. *Construct the labor market indices using adminastrative data, following the same proceducre as in the main data
. clear
{txt}
{com}. 
. odbc load, exec("select * from Individ_2001") dsn("P0934") clear
{txt}
{com}. gen year=2001
{txt}
{com}. save kolfu_base, replace
{txt}{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}

{com}. forvalues year=2002/2015{c -(}       
{txt}  2{com}.         odbc load, exec("select * from Individ_`year'") dsn("P0934") clear
{txt}  3{com}.         gen year = `year'
{txt}  4{com}.         append using kolfu_base, force
{txt}  5{com}.         save kolfu_base, replace
{txt}  6{com}. {c )-}
{txt}{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}
{p 0 7 2}
(variable
{bf:Sun2000Grp} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}
{p 0 4 2}
file {bf}
kolfu_base.dta{rm}
saved
{p_end}

{com}. ren P0934_Lopnr_PersonNr p_id
{res}{txt}
{com}. gen pbb = 44500 if year == 2015
{txt}(183,223 missing values generated)

{com}. replace pbb = 44400 if year == 2014
{txt}(13,463 real changes made)

{com}. replace pbb = 44400 if year == 2013
{txt}(13,459 real changes made)

{com}. replace pbb = 44000 if year == 2012
{txt}(13,458 real changes made)

{com}. replace pbb     = 42800 if      year == 2011
{txt}(13,448 real changes made)

{com}. replace pbb     = 42400 if      year == 2010
{txt}(13,397 real changes made)

{com}. replace pbb     = 42800 if      year == 2009
{txt}(13,261 real changes made)

{com}. replace pbb     = 41000 if      year == 2008
{txt}(13,187 real changes made)

{com}. replace pbb     = 40300 if      year == 2007
{txt}(13,097 real changes made)

{com}. replace pbb     = 39700 if      year == 2006
{txt}(13,001 real changes made)

{com}. replace pbb     = 39400 if      year == 2005
{txt}(12,901 real changes made)

{com}. replace pbb     = 39300 if      year == 2004
{txt}(12,810 real changes made)

{com}. replace pbb     = 38600 if      year == 2003
{txt}(12,705 real changes made)

{com}. replace pbb     = 37900 if      year == 2002
{txt}(12,580 real changes made)

{com}. replace pbb     = 36900 if      year == 2001
{txt}(12,456 real changes made)

{com}. replace pbb=pbb/100 
{txt}(196,685 real changes made)

{com}. gen politician =  AstSNI2007 == "84111" | AstSNI2002 == "75111" | AstSNI92 == "75111"
{txt}
{com}. gen BusPers=0 if YrkStalln!=""
{txt}
{com}. replace BusPers=1 if YrkStalln=="4" |YrkStalln=="5" 
{txt}(15,130 real changes made)

{com}. gen Employee=0 if YrkStalln!=""
{txt}
{com}. replace Employee =1 if YrkStalln=="2" | YrkStalln=="1"
{txt}(174,446 real changes made)

{com}. gen cap_exec = -1 if Employee==1
{txt}(22,239 missing values generated)

{com}. replace FInk= InkFNetto if FInk==.
{txt}(158,944 real changes made)

{com}. replace cap_exec = 0.5 if PasNar!=0 | FInk!=0
{txt}(34,093 real changes made)

{com}. replace cap_exec = 1   if (OpFtgLedare =="1" | BusPers ==1) 
{txt}(21,654 real changes made)

{com}. replace cap_exec=. if ForvErs<(pbb*3.5) |politician==1
{txt}(48,040 real changes made, 48,040 to missing)

{com}. fasterxtile inc_pct_emp=ForvErs if  ForvErs>(pbb*3.5) & cap_exec ==-1 , by(year) n(100)
{res}{txt}
{com}. foreach var in  inc_pct_emp{c -(}
{txt}  2{com}.         replace  `var' = (`var'-50.5)/49.5
{txt}  3{com}. {c )-}
{txt}variable {bf}{res}inc_pct_emp{sf}{txt} was {bf}{res}int{sf}{txt} now {bf}{res}float{sf}
{txt}(110,018 real changes made)

{com}. replace inc_pct_emp= inc_pct_emp/(2/1.5)-.25
{txt}(108,900 real changes made)

{com}. gen cap_exec_alt= cap_exec
{txt}(55,060 missing values generated)

{com}. replace  cap_exec_alt= inc_pct_emp if cap_exec==-1
{txt}(108,909 real changes made, 9 to missing)

{com}. gen PrivSec =0 if SektorKod!="0"
{txt}
{com}. replace PrivSec=1 if SektorKod=="21" |SektorKod=="22" |SektorKod=="25"
{txt}(80,537 real changes made)

{com}. gen PubSec = (PrivSec-1)*-1
{txt}
{com}. gen PubCom = 0 if SektorKod!="0"
{txt}
{com}. replace PubCom = 1 if SektorKod=="12" |SektorKod=="23" |SektorKod=="24"
{txt}(7,608 real changes made)

{com}. replace PubSec=0 if PubCom==1
{txt}(7,608 real changes made)

{com}. gen NonProfit = 0 if SektorKod!="0"
{txt}
{com}. gen InstKodsub = substr(InstKod7, 6,7)
{txt}(26,925 missing values generated)

{com}. replace NonProfit=1 if InstKodsub == "54" | InstKodsub == "61" | InstKodsub == "62" | InstKodsub == "63" | InstKodsub== "71" | InstKodsub== "72"| InstKodsub== "95"
{txt}(13,634 real changes made)

{com}. replace PrivSec = 0 if NonProfit ==1
{txt}(12,272 real changes made)

{com}. gen  sector = PrivSec - PubSec - PubCom*0 - NonProfit*0
{txt}
{com}. replace sector=. if ForvErs<(pbb*3.5)|politician==1
{txt}(55,060 real changes made, 55,060 to missing)

{com}. 
. do  "\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\ssyk 2012 to 96 crosswalk.do"
{txt}
{com}. 
. 
. gen ssyk96kod = ""
{txt}(196,685 missing values generated)

{com}. replace ssyk96kod = "0110" if Ssyk4_2012 == "0110" | Ssyk4_2012 == "0210" | Ssyk4_2012 == "0310"
{txt}variable {bf}{res}ssyk96kod{sf}{txt} was {bf}{res}str1{sf}{txt} now {bf}{res}str4{sf}
{txt}(19 real changes made)

{com}. replace ssyk96kod = "1110" if Ssyk4_2012 == "1111" | Ssyk4_2012 == "1112"
{txt}(239 real changes made)

{com}. replace ssyk96kod = "1120" if Ssyk4_2012 == "1113"
{txt}(15 real changes made)

{com}. replace ssyk96kod = "1210" if Ssyk4_2012 == "1120" | Ssyk4_2012 == "1611"
{txt}(86 real changes made)

{com}. replace ssyk96kod = "1221" if Ssyk4_2012 == "1380" | Ssyk4_2012 == "1591" | Ssyk4_2012 == "1592"
{txt}(117 real changes made)

{com}. replace ssyk96kod = "1222" if Ssyk4_2012 == "1361" | Ssyk4_2012 == "1362" | Ssyk4_2012 == "1371" | Ssyk4_2012 == "1372"
{txt}(89 real changes made)

{com}. replace ssyk96kod = "1223" if Ssyk4_2012 == "1361" | Ssyk4_2012 == "1362"
{txt}(26 real changes made)

{com}. replace ssyk96kod = "1224" if Ssyk4_2012 == "1321" | Ssyk4_2012 == "1322" | Ssyk4_2012 == "1711" | Ssyk4_2012 == "1721" | Ssyk4_2012 == "1722" | Ssyk4_2012 == "1731" | Ssyk4_2012 == "1732" | Ssyk4_2012 == "1791" | Ssyk4_2012 == "5221"
{txt}(107 real changes made)

{com}. replace ssyk96kod = "1225" if Ssyk4_2012 == "1351" | Ssyk4_2012 == "1352" | Ssyk4_2012 == "1611" | Ssyk4_2012 == "1612" | Ssyk4_2012 == "1791" | Ssyk4_2012 == "1792"
{txt}(52 real changes made)

{com}. replace ssyk96kod = "1226" if Ssyk4_2012 == "1230" | Ssyk4_2012 == "1341" | Ssyk4_2012 == "1342" | Ssyk4_2012 == "1591" | Ssyk4_2012 == "1592" | Ssyk4_2012 == "1741" | Ssyk4_2012 == "1742" | Ssyk4_2012 == "2422"
{txt}(1,318 real changes made)

{com}. replace ssyk96kod = "1227" if Ssyk4_2012 == "1411" | Ssyk4_2012 == "1412" | Ssyk4_2012 == "1421" | Ssyk4_2012 == "1422"
{txt}(138 real changes made)

{com}. replace ssyk96kod = "1228" if Ssyk4_2012 == "1230" | Ssyk4_2012 == "1421" | Ssyk4_2012 == "1422" | Ssyk4_2012 == "1511" | Ssyk4_2012 == "1512" | Ssyk4_2012 == "1521" | Ssyk4_2012 == "1522" | Ssyk4_2012 == "1531" | Ssyk4_2012 == "1532" | Ssyk4_2012 == "1731" | Ssyk4_2012 == "1732"
{txt}(290 real changes made)

{com}. replace ssyk96kod = "1229" if Ssyk4_2012 == "1291" | Ssyk4_2012 == "1351" | Ssyk4_2012 == "1352" | Ssyk4_2012 == "1591" | Ssyk4_2012 == "1592" | Ssyk4_2012 == "1741" | Ssyk4_2012 == "1742" | Ssyk4_2012 == "1791" | Ssyk4_2012 == "1792" | Ssyk4_2012 == "2654"
{txt}(179 real changes made)

{com}. replace ssyk96kod = "1231" if Ssyk4_2012 == "1211" | Ssyk4_2012 == "1212" | Ssyk4_2012 == "1230" | Ssyk4_2012 == "1291"
{txt}(133 real changes made)

{com}. replace ssyk96kod = "1232" if Ssyk4_2012 == "1221" | Ssyk4_2012 == "1222"
{txt}(18 real changes made)

{com}. replace ssyk96kod = "1233" if Ssyk4_2012 == "1251" | Ssyk4_2012 == "1252"
{txt}(80 real changes made)

{com}. replace ssyk96kod = "1234" if Ssyk4_2012 == "1241" | Ssyk4_2012 == "1242" | Ssyk4_2012 == "1731"
{txt}(22 real changes made)

{com}. replace ssyk96kod = "1235" if Ssyk4_2012 == "1321" | Ssyk4_2012 == "1322"
{txt}(24 real changes made)

{com}. replace ssyk96kod = "1236" if Ssyk4_2012 == "1311" | Ssyk4_2012 == "1312"
{txt}(45 real changes made)

{com}. replace ssyk96kod = "1237" if Ssyk4_2012 == "1291" | Ssyk4_2012 == "1292" | Ssyk4_2012 == "1331" | Ssyk4_2012 == "1332"
{txt}(76 real changes made)

{com}. replace ssyk96kod = "1239" if Ssyk4_2012 == "1291" | Ssyk4_2012 == "1292"
{txt}(63 real changes made)

{com}. replace ssyk96kod = "1311" if Ssyk4_2012 == "1380" | Ssyk4_2012 == "6111" | Ssyk4_2012 == "6112" | Ssyk4_2012 == "6113" | Ssyk4_2012 == " 6121" | Ssyk4_2012 == "6129" | Ssyk4_2012 == "6130" | Ssyk4_2012 == "6210"
{txt}(149 real changes made)

{com}. replace ssyk96kod = "1312" if Ssyk4_2012 == "1371" | Ssyk4_2012 == "1372"
{txt}(63 real changes made)

{com}. replace ssyk96kod = "1313" if Ssyk4_2012 == "1361" | Ssyk4_2012 == "1362"
{txt}(26 real changes made)

{com}. replace ssyk96kod = "1314" if Ssyk4_2012 == "1322" | Ssyk4_2012 == "1712" | Ssyk4_2012 == "1721" | Ssyk4_2012 == "1722" | Ssyk4_2012 == "1731" | Ssyk4_2012 == "1732" | Ssyk4_2012 == "1791" | Ssyk4_2012 == "1792" | Ssyk4_2012 == "5221"
{txt}(126 real changes made)

{com}. replace ssyk96kod = "1315" if Ssyk4_2012 == "1352" | Ssyk4_2012 == "1611" | Ssyk4_2012 == "1612"
{txt}(18 real changes made)

{com}. replace ssyk96kod = "1316" if Ssyk4_2012 == "1591" | Ssyk4_2012 == "1592"
{txt}(115 real changes made)

{com}. replace ssyk96kod = "1317" if Ssyk4_2012 == "1412" | Ssyk4_2012 == " 1422" | Ssyk4_2012 == "1491" | Ssyk4_2012 == "1492"
{txt}(130 real changes made)

{com}. replace ssyk96kod = "1318" if Ssyk4_2012 == "1421" | Ssyk4_2012 == "1422" | Ssyk4_2012 == "1512" | Ssyk4_2012 == "1521" | Ssyk4_2012 == "1522" | Ssyk4_2012 == " 1531" | Ssyk4_2012 == "1532"
{txt}(187 real changes made)

{com}. replace ssyk96kod = "1319" if Ssyk4_2012 == "1292" | Ssyk4_2012 == "1741" | Ssyk4_2012 == "1742" | Ssyk4_2012 == "1791" | Ssyk4_2012 == "1792" | Ssyk4_2012 == "2642" | Ssyk4_2012 == "2652" | Ssyk4_2012 == "2654"
{txt}(113 real changes made)

{com}. replace ssyk96kod = "2111" if Ssyk4_2012 == "2111"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "2112" if Ssyk4_2012 == "2112"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "2113" if Ssyk4_2012 == "2113"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "2114" if Ssyk4_2012 == "2114"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "2121" if Ssyk4_2012 == "2121"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "2122" if Ssyk4_2012 == "2122"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "2131" if Ssyk4_2012 == "2512" | Ssyk4_2012 == "2513" | Ssyk4_2012 == "2514" | Ssyk4_2012 == "2515" | Ssyk4_2012 == "3513" | Ssyk4_2012 == "3514"
{txt}(154 real changes made)

{com}. replace ssyk96kod = "2139" if Ssyk4_2012 == "1312" | Ssyk4_2012 == "2511" | Ssyk4_2012 == "2515" | Ssyk4_2012 == "2516" | Ssyk4_2012 == "2519"
{txt}(100 real changes made)

{com}. replace ssyk96kod = "2141" if Ssyk4_2012 == "2161" | Ssyk4_2012 == "2162" | Ssyk4_2012 == "2163"
{txt}(19 real changes made)

{com}. replace ssyk96kod = "2142" if Ssyk4_2012 == "2142"
{txt}(9 real changes made)

{com}. replace ssyk96kod = "2143" if Ssyk4_2012 == "2143"
{txt}(43 real changes made)

{com}. replace ssyk96kod = "2144" if Ssyk4_2012 == "2143"
{txt}(43 real changes made)

{com}. replace ssyk96kod = "2145" if Ssyk4_2012 == "2144"
{txt}(26 real changes made)

{com}. replace ssyk96kod = "2146" if Ssyk4_2012 == "2145"
{txt}(20 real changes made)

{com}. replace ssyk96kod = "2147" if Ssyk4_2012 == "2146"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "2148" if Ssyk4_2012 == "2164"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "2149" if Ssyk4_2012 == "2141" | Ssyk4_2012 == " 2149" | Ssyk4_2012 == "2183"
{txt}(26 real changes made)

{com}. replace ssyk96kod = "2211" if Ssyk4_2012 == "2131" | Ssyk4_2012 == "2132" | Ssyk4_2012 == "2183"
{txt}(25 real changes made)

{com}. replace ssyk96kod = "2212" if Ssyk4_2012 == "2133"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "2213" if Ssyk4_2012 == "2134"
{txt}(15 real changes made)

{com}. replace ssyk96kod = "2214" if Ssyk4_2012 == "2135"
{txt}(20 real changes made)

{com}. replace ssyk96kod = "2221" if Ssyk4_2012 == "2211" | Ssyk4_2012 == "2212" | Ssyk4_2012 == "2213" | Ssyk4_2012 == "2219"
{txt}(84 real changes made)

{com}. replace ssyk96kod = "2222" if Ssyk4_2012 == "2260"
{txt}(10 real changes made)

{com}. replace ssyk96kod = "2223" if Ssyk4_2012 == "2250"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "2224" if Ssyk4_2012 == "2281"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "2225" if Ssyk4_2012 == "2283"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "2229" if Ssyk4_2012 == "2131" | Ssyk4_2012 == "2239"
{txt}(29 real changes made)

{com}. replace ssyk96kod = "2231" if Ssyk4_2012 == "2222"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "2233" if Ssyk4_2012 == "2223" | Ssyk4_2012 == "2226" | Ssyk4_2012 == "2228" | Ssyk4_2012 == "3211"
{txt}(37 real changes made)

{com}. replace ssyk96kod = "2234" if Ssyk4_2012 == "2232" | Ssyk4_2012 == "2233"
{txt}(15 real changes made)

{com}. replace ssyk96kod = "2235" if Ssyk4_2012 == "2224"
{txt}(39 real changes made)

{com}. replace ssyk96kod = "2236" if Ssyk4_2012 == "2234" | Ssyk4_2012 == "2239"
{txt}(31 real changes made)

{com}. replace ssyk96kod = "2310" if Ssyk4_2012 == "2311" | Ssyk4_2012 == "2312" | Ssyk4_2012 == "2313" | Ssyk4_2012 == "2314" | Ssyk4_2012 == "2319"
{txt}(141 real changes made)

{com}. replace ssyk96kod = "2321" if Ssyk4_2012 == "2330"
{txt}(323 real changes made)

{com}. replace ssyk96kod = "2322" if Ssyk4_2012 == "2320"
{txt}(86 real changes made)

{com}. replace ssyk96kod = "2323" if Ssyk4_2012 == "2330" | Ssyk4_2012 == "2341" | Ssyk4_2012 == "2359"
{txt}(1,087 real changes made)

{com}. replace ssyk96kod = "2330" if Ssyk4_2012 == "2341"
{txt}(626 real changes made)

{com}. replace ssyk96kod = "2340" if Ssyk4_2012 == "2351"
{txt}(80 real changes made)

{com}. replace ssyk96kod = "2351" if Ssyk4_2012 == "2351"
{txt}(80 real changes made)

{com}. replace ssyk96kod = "2359" if Ssyk4_2012 == "2359" | Ssyk4_2012 == "3449"
{txt}(168 real changes made)

{com}. replace ssyk96kod = "2411" if Ssyk4_2012 == "1212" | Ssyk4_2012 == "2411" | Ssyk4_2012 == "2412"
{txt}(94 real changes made)

{com}. replace ssyk96kod = "2412" if Ssyk4_2012 == "2352" | Ssyk4_2012 == "2423"
{txt}(115 real changes made)

{com}. replace ssyk96kod = "2413" if Ssyk4_2012 == "1242" | Ssyk4_2012 == "1252" | Ssyk4_2012 == "2431" | Ssyk4_2012 == "2432"
{txt}(186 real changes made)

{com}. replace ssyk96kod = "2414" if Ssyk4_2012 == "2421"
{txt}(62 real changes made)

{com}. replace ssyk96kod = "2419" if Ssyk4_2012 == "1591" | Ssyk4_2012 == "1592" | Ssyk4_2012 == "2412" | Ssyk4_2012 == "2413" | Ssyk4_2012 == "2414" | Ssyk4_2012 == "2419" | Ssyk4_2012 == "2421" | Ssyk4_2012 == "2422"
{txt}(1,389 real changes made)

{com}. replace ssyk96kod = "2421" if Ssyk4_2012 == "2611" | Ssyk4_2012 == "2613"
{txt}(18 real changes made)

{com}. replace ssyk96kod = "2422" if Ssyk4_2012 == "2612"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "2423" if Ssyk4_2012 == "2614" | Ssyk4_2012 == "2615" | Ssyk4_2012 == "2619"
{txt}(54 real changes made)

{com}. replace ssyk96kod = "2429" if Ssyk4_2012 == "2619"
{txt}(26 real changes made)

{com}. replace ssyk96kod = "2431" if Ssyk4_2012 == "2621" | Ssyk4_2012 == "2622"
{txt}(43 real changes made)

{com}. replace ssyk96kod = "2432" if Ssyk4_2012 == "2622"
{txt}(30 real changes made)

{com}. replace ssyk96kod = "2441" if Ssyk4_2012 == "2415"
{txt}(7 real changes made)

{com}. replace ssyk96kod = "2442" if Ssyk4_2012 == "2623"
{txt}(7 real changes made)

{com}. replace ssyk96kod = "2443" if Ssyk4_2012 == "2623"
{txt}(7 real changes made)

{com}. replace ssyk96kod = "2444" if Ssyk4_2012 == "2643"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "2451" if Ssyk4_2012 == "1242" | Ssyk4_2012 == "2432" | Ssyk4_2012 == "2641" | Ssyk4_2012 == "2642" | Ssyk4_2012 == "2654"
{txt}(118 real changes made)

{com}. replace ssyk96kod = "2452" if Ssyk4_2012 == "2651"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "2453" if Ssyk4_2012 == "2652"
{txt}(21 real changes made)

{com}. replace ssyk96kod = "2454" if Ssyk4_2012 == "2653"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "2455" if Ssyk4_2012 == "2654" | Ssyk4_2012 == "2655" | Ssyk4_2012 == "3432" | Ssyk4_2012 == "3439"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "2456" if Ssyk4_2012 == "2171" | Ssyk4_2012 == "2172" | Ssyk4_2012 == "2173" | Ssyk4_2012 == "2179" | Ssyk4_2012 == "2651"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "2460" if Ssyk4_2012 == "1540" | Ssyk4_2012 == "2671"
{txt}(42 real changes made)

{com}. replace ssyk96kod = "2470" if Ssyk4_2012 == "2183" | Ssyk4_2012 == "2422" | Ssyk4_2012 == "2661"
{txt}(1,234 real changes made)

{com}. replace ssyk96kod = "2480" if Ssyk4_2012 == "2422"
{txt}(1,115 real changes made)

{com}. replace ssyk96kod = "2491" if Ssyk4_2012 == "2241" | Ssyk4_2012 == "2242"
{txt}(17 real changes made)

{com}. replace ssyk96kod = "2492" if Ssyk4_2012 == "2661" | Ssyk4_2012 == "2662" | Ssyk4_2012 == "2669" | Ssyk4_2012 == "2672"
{txt}(221 real changes made)

{com}. replace ssyk96kod = "3111" if Ssyk4_2012 == "3215"
{txt}(21 real changes made)

{com}. replace ssyk96kod = "3112" if Ssyk4_2012 == "3112" | Ssyk4_2012 == "3121"
{txt}(50 real changes made)

{com}. replace ssyk96kod = "3113" if Ssyk4_2012 == "3113"
{txt}(50 real changes made)

{com}. replace ssyk96kod = "3114" if Ssyk4_2012 == "3113" | Ssyk4_2012 == "7420"
{txt}(66 real changes made)

{com}. replace ssyk96kod = "3115" if Ssyk4_2012 == "3111" | Ssyk4_2012 == "3114"
{txt}(73 real changes made)

{com}. replace ssyk96kod = "3116" if Ssyk4_2012 == "3115"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "3117" if Ssyk4_2012 == "3116"
{txt}(1 real change made)

{com}. replace ssyk96kod = "3118" if Ssyk4_2012 == "3117"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "3119" if Ssyk4_2012 == "3115" | Ssyk4_2012 == "3119" | Ssyk4_2012 == "3122"
{txt}(80 real changes made)

{com}. replace ssyk96kod = "3121" if Ssyk4_2012 == "3511" | Ssyk4_2012 == "3512" | Ssyk4_2012 == "3513" | Ssyk4_2012 == "3514" | Ssyk4_2012 == "3515"
{txt}(65 real changes made)

{com}. replace ssyk96kod = "3122" if Ssyk4_2012 == "3511"
{txt}(32 real changes made)

{com}. replace ssyk96kod = "3131" if Ssyk4_2012 == "3431" | Ssyk4_2012 == "3521"
{txt}(1 real change made)

{com}. replace ssyk96kod = "3132" if Ssyk4_2012 == "3521" | Ssyk4_2012 == "3522"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "3133" if Ssyk4_2012 == "3521" | Ssyk4_2012 == "5414"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "3134" if Ssyk4_2012 == "3211" | Ssyk4_2012 == "3214"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "3141" if Ssyk4_2012 == "3151"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "3142" if Ssyk4_2012 == "3152" | Ssyk4_2012 == "5414"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "3143" if Ssyk4_2012 == "3153"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "3144" if Ssyk4_2012 == "3154"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "3145" if Ssyk4_2012 == "3155"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "3151" if Ssyk4_2012 == "3355"
{txt}(23 real changes made)

{com}. replace ssyk96kod = "3152" if Ssyk4_2012 == "2181" | Ssyk4_2012 == "2182" | Ssyk4_2012 == "3354" | Ssyk4_2012 == "4430"
{txt}(93 real changes made)

{com}. replace ssyk96kod = "3211" if Ssyk4_2012 == "2134" | Ssyk4_2012 == "3215" | Ssyk4_2012 == "3359" | Ssyk4_2012 == "6113"
{txt}(161 real changes made)

{com}. replace ssyk96kod = "3212" if Ssyk4_2012 == "2135" | Ssyk4_2012 == "2183" | Ssyk4_2012 == "3215"
{txt}(56 real changes made)

{com}. replace ssyk96kod = "3221" if Ssyk4_2012 == "2273"
{txt}(15 real changes made)

{com}. replace ssyk96kod = "3222" if Ssyk4_2012 == "2181" | Ssyk4_2012 == "2182" | Ssyk4_2012 == "2183" | Ssyk4_2012 == "2221" | Ssyk4_2012 == "5349"
{txt}(172 real changes made)

{com}. replace ssyk96kod = "3223" if Ssyk4_2012 == "2282"
{txt}(1 real change made)

{com}. replace ssyk96kod = "3224" if Ssyk4_2012 == "2284"
{txt}(1 real change made)

{com}. replace ssyk96kod = "3225" if Ssyk4_2012 == "3250"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "3226" if Ssyk4_2012 == "2271" | Ssyk4_2012 == "2272"
{txt}(23 real changes made)

{com}. replace ssyk96kod = "3227" if Ssyk4_2012 == "3240" | Ssyk4_2012 == "6122"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "3228" if Ssyk4_2012 == "3213"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "3229" if Ssyk4_2012 == "2271" | Ssyk4_2012 == "2283" | Ssyk4_2012 == "2289" | Ssyk4_2012 == "3230" | Ssyk4_2012 == "5349"
{txt}(31 real changes made)

{com}. replace ssyk96kod = "3231" if Ssyk4_2012 == "2221"
{txt}(103 real changes made)

{com}. replace ssyk96kod = "3232" if Ssyk4_2012 == "2231"
{txt}(13 real changes made)

{com}. replace ssyk96kod = "3233" if Ssyk4_2012 == "2227"
{txt}(47 real changes made)

{com}. replace ssyk96kod = "3234" if Ssyk4_2012 == "2225"
{txt}(24 real changes made)

{com}. replace ssyk96kod = "3235" if Ssyk4_2012 == "2235"
{txt}(12 real changes made)

{com}. replace ssyk96kod = "3239" if Ssyk4_2012 == "2221" | Ssyk4_2012 == "2234" | Ssyk4_2012 == "2239"
{txt}(134 real changes made)

{com}. replace ssyk96kod = "3240" if Ssyk4_2012 == "3212"
{txt}(21 real changes made)

{com}. replace ssyk96kod = "3310" if Ssyk4_2012 == "2342" | Ssyk4_2012 == "2343"
{txt}(249 real changes made)

{com}. replace ssyk96kod = "3320" if Ssyk4_2012 == "2359" | Ssyk4_2012 == "3153" | Ssyk4_2012 == "3441" | Ssyk4_2012 == "3449"
{txt}(173 real changes made)

{com}. replace ssyk96kod = "3411" if Ssyk4_2012 == "2414" | Ssyk4_2012 == "3311"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "3412" if Ssyk4_2012 == "3321"
{txt}(19 real changes made)

{com}. replace ssyk96kod = "3413" if Ssyk4_2012 == "3334" | Ssyk4_2012 == "3335"
{txt}(29 real changes made)

{com}. replace ssyk96kod = "3414" if Ssyk4_2012 == "3332" | Ssyk4_2012 == "4221"
{txt}(10 real changes made)

{com}. replace ssyk96kod = "3415" if Ssyk4_2012 == "1252" | Ssyk4_2012 == "1731" | Ssyk4_2012 == "1732" | Ssyk4_2012 == "3322"
{txt}(222 real changes made)

{com}. replace ssyk96kod = "3416" if Ssyk4_2012 == "1322" | Ssyk4_2012 == "3111" | Ssyk4_2012 == "3323"
{txt}(81 real changes made)

{com}. replace ssyk96kod = "3417" if Ssyk4_2012 == "3314" | Ssyk4_2012 == "3339"
{txt}(21 real changes made)

{com}. replace ssyk96kod = "3418" if Ssyk4_2012 == "3312"
{txt}(50 real changes made)

{com}. replace ssyk96kod = "3419" if Ssyk4_2012 == "3111" | Ssyk4_2012 == "3324" | Ssyk4_2012 == "3339" | Ssyk4_2012 == "4114"
{txt}(46 real changes made)

{com}. replace ssyk96kod = "3421" if Ssyk4_2012 == "3331"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "3422" if Ssyk4_2012 == "3331"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "3423" if Ssyk4_2012 == "3333"
{txt}(175 real changes made)

{com}. replace ssyk96kod = "3429" if Ssyk4_2012 == "3331" | Ssyk4_2012 == "3332" | Ssyk4_2012 == "3339"
{txt}(12 real changes made)

{com}. replace ssyk96kod = "3431" if Ssyk4_2012 == "1230" | Ssyk4_2012 == "1292" | Ssyk4_2012 == "3341" | Ssyk4_2012 == "3343" | Ssyk4_2012 == "3359" | Ssyk4_2012 == "4119" | Ssyk4_2012 == "4222" | Ssyk4_2012 == "4430" | Ssyk4_2012 == "5151"
{txt}(600 real changes made)

{com}. replace ssyk96kod = "3432" if Ssyk4_2012 == "3342" | Ssyk4_2012 == "4430"
{txt}(60 real changes made)

{com}. replace ssyk96kod = "3433" if Ssyk4_2012 == "3313" | Ssyk4_2012 == "4430"
{txt}(111 real changes made)

{com}. replace ssyk96kod = "3441" if Ssyk4_2012 == "3351"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "3442" if Ssyk4_2012 == "3352"
{txt}(34 real changes made)

{com}. replace ssyk96kod = "3443" if Ssyk4_2012 == "3353"
{txt}(132 real changes made)

{com}. replace ssyk96kod = "3449" if Ssyk4_2012 == "3359"
{txt}(99 real changes made)

{com}. replace ssyk96kod = "3450" if Ssyk4_2012 == "3360"
{txt}(61 real changes made)

{com}. replace ssyk96kod = "3461" if Ssyk4_2012 == "2663" | Ssyk4_2012 == "3411"
{txt}(182 real changes made)

{com}. replace ssyk96kod = "3462" if Ssyk4_2012 == "3422" | Ssyk4_2012 == "3423" | Ssyk4_2012 == "3424"
{txt}(126 real changes made)

{com}. replace ssyk96kod = "3471" if Ssyk4_2012 == "2172" | Ssyk4_2012 == "2173" | Ssyk4_2012 == "2179" | Ssyk4_2012 == "2641" | Ssyk4_2012 == "2651" | Ssyk4_2012 == "3432" | Ssyk4_2012 == "3439"
{txt}(19 real changes made)

{com}. replace ssyk96kod = "3472" if Ssyk4_2012 == "3439" | Ssyk4_2012 == "5241"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "3473" if Ssyk4_2012 == "2652" | Ssyk4_2012 == "2653" | Ssyk4_2012 == "2655" | Ssyk4_2012 == "3439"
{txt}(23 real changes made)

{com}. replace ssyk96kod = "3474" if Ssyk4_2012 == "3439" | Ssyk4_2012 == "3522"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "3475" if Ssyk4_2012 == "3421" | Ssyk4_2012 == "3422"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "3476" if Ssyk4_2012 == "3433" | Ssyk4_2012 == "3522"
{txt}(1 real change made)

{com}. replace ssyk96kod = "3480" if Ssyk4_2012 == "3412"
{txt}(1 real change made)

{com}. replace ssyk96kod = "4111" if Ssyk4_2012 == "4119"
{txt}(288 real changes made)

{com}. replace ssyk96kod = "4112" if Ssyk4_2012 == "3342" | Ssyk4_2012 == "4112" | Ssyk4_2012 == "4114" | Ssyk4_2012 == "4117" | Ssyk4_2012 == "4119"
{txt}(353 real changes made)

{com}. replace ssyk96kod = "4120" if Ssyk4_2012 == "4111" | Ssyk4_2012 == "4112" | Ssyk4_2012 == "4113"
{txt}(95 real changes made)

{com}. replace ssyk96kod = "4131" if Ssyk4_2012 == "1322" | Ssyk4_2012 == "4321" | Ssyk4_2012 == "4322"
{txt}(136 real changes made)

{com}. replace ssyk96kod = "4132" if Ssyk4_2012 == "4323"
{txt}(27 real changes made)

{com}. replace ssyk96kod = "4140" if Ssyk4_2012 == "4410"
{txt}(17 real changes made)

{com}. replace ssyk96kod = "4150" if Ssyk4_2012 == "4420"
{txt}(47 real changes made)

{com}. replace ssyk96kod = "4190" if Ssyk4_2012 == "4114" | Ssyk4_2012 == "4115" | Ssyk4_2012 == "4116" | Ssyk4_2012 == "4119" | Ssyk4_2012 == "4222" | Ssyk4_2012 == "4226" | Ssyk4_2012 == "4430"
{txt}(429 real changes made)

{com}. replace ssyk96kod = "4211" if Ssyk4_2012 == "5230"
{txt}(15 real changes made)

{com}. replace ssyk96kod = "4212" if Ssyk4_2012 == "3312" | Ssyk4_2012 == "5230"
{txt}(65 real changes made)

{com}. replace ssyk96kod = "4213" if Ssyk4_2012 == "4211"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "4214" if Ssyk4_2012 == "4212"
{txt}(9 real changes made)

{com}. replace ssyk96kod = "4215" if Ssyk4_2012 == "4212"
{txt}(9 real changes made)

{com}. replace ssyk96kod = "4221" if Ssyk4_2012 == "4221"
{txt}(8 real changes made)

{com}. replace ssyk96kod = "4222" if Ssyk4_2012 == "4222" | Ssyk4_2012 == "4224" | Ssyk4_2012 == "4225"
{txt}(77 real changes made)

{com}. replace ssyk96kod = "4223" if Ssyk4_2012 == "4222" | Ssyk4_2012 == "4223"
{txt}(43 real changes made)

{com}. replace ssyk96kod = "4224" if Ssyk4_2012 == "4221" | Ssyk4_2012 == "5112"
{txt}(26 real changes made)

{com}. replace ssyk96kod = "5111" if Ssyk4_2012 == "5111"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "5112" if Ssyk4_2012 == "5112"
{txt}(18 real changes made)

{com}. replace ssyk96kod = "5113" if Ssyk4_2012 == "5113"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "5121" if Ssyk4_2012 == "3452" | Ssyk4_2012 == "5151"
{txt}(7 real changes made)

{com}. replace ssyk96kod = "5122" if Ssyk4_2012 == "3451" | Ssyk4_2012 == "5120" | Ssyk4_2012 == "9411"
{txt}(71 real changes made)

{com}. replace ssyk96kod = "5123" if Ssyk4_2012 == "5131" | Ssyk4_2012 == "5132"
{txt}(27 real changes made)

{com}. replace ssyk96kod = "5131" if Ssyk4_2012 == "5311" | Ssyk4_2012 == "5312"
{txt}(223 real changes made)

{com}. replace ssyk96kod = "5132" if Ssyk4_2012 == "5321" | Ssyk4_2012 == "5322" | Ssyk4_2012 == "5323" | Ssyk4_2012 == "5324" | Ssyk4_2012 == "5325" | Ssyk4_2012 == "5326" | Ssyk4_2012 == "5330" | Ssyk4_2012 == "5349"
{txt}(801 real changes made)

{com}. replace ssyk96kod = "5133" if Ssyk4_2012 == "4430" | Ssyk4_2012 == "5321" | Ssyk4_2012 == "5322" | Ssyk4_2012 == "5330" | Ssyk4_2012 == "5342" | Ssyk4_2012 == "5343" | Ssyk4_2012 == "5349"
{txt}(1,223 real changes made)

{com}. replace ssyk96kod = "5134" if Ssyk4_2012 == "5330" | Ssyk4_2012 == "5341" | Ssyk4_2012 == "5342" | Ssyk4_2012 == "5349"
{txt}(519 real changes made)

{com}. replace ssyk96kod = "5135" if Ssyk4_2012 == "5350"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "5139" if Ssyk4_2012 == "5227" | Ssyk4_2012 == "5323" | Ssyk4_2012 == "5349" | Ssyk4_2012 == "6121" | Ssyk4_2012 == "6122"
{txt}(157 real changes made)

{com}. replace ssyk96kod = "5141" if Ssyk4_2012 == "5141" | Ssyk4_2012 == "5142" | Ssyk4_2012 == "5143" | Ssyk4_2012 == "5144" | Ssyk4_2012 == "5149" | Ssyk4_2012 == "5419"
{txt}(40 real changes made)

{com}. replace ssyk96kod = "5142" if Ssyk4_2012 == "5161"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "5149" if Ssyk4_2012 == "3424" | Ssyk4_2012 == "5169"
{txt}(8 real changes made)

{com}. replace ssyk96kod = "5151" if Ssyk4_2012 == "5411"
{txt}(25 real changes made)

{com}. replace ssyk96kod = "5152" if Ssyk4_2012 == "5413" | Ssyk4_2012 == "5419"
{txt}(74 real changes made)

{com}. replace ssyk96kod = "5153" if Ssyk4_2012 == "5412"
{txt}(32 real changes made)

{com}. replace ssyk96kod = "5159" if Ssyk4_2012 == "5419"
{txt}(27 real changes made)

{com}. replace ssyk96kod = "5210" if Ssyk4_2012 == "5241"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "5221" if Ssyk4_2012 == "5221" | Ssyk4_2012 == "5222"
{txt}(121 real changes made)

{com}. replace ssyk96kod = "5222" if Ssyk4_2012 == "5221" | Ssyk4_2012 == "5223" | Ssyk4_2012 == "5224"
{txt}(125 real changes made)

{com}. replace ssyk96kod = "5223" if Ssyk4_2012 == "5221" | Ssyk4_2012 == "9413"
{txt}(45 real changes made)

{com}. replace ssyk96kod = "5224" if Ssyk4_2012 == "5221" | Ssyk4_2012 == "5230"
{txt}(57 real changes made)

{com}. replace ssyk96kod = "5225" if Ssyk4_2012 == "5221" | Ssyk4_2012 == "5225"
{txt}(52 real changes made)

{com}. replace ssyk96kod = "5226" if Ssyk4_2012 == "5223"
{txt}(83 real changes made)

{com}. replace ssyk96kod = "5227" if Ssyk4_2012 == "4222" | Ssyk4_2012 == "5221" | Ssyk4_2012 == "5226" | Ssyk4_2012 == "5241" | Ssyk4_2012 == "5242"
{txt}(99 real changes made)

{com}. replace ssyk96kod = "6111" if Ssyk4_2012 == "6111"
{txt}(20 real changes made)

{com}. replace ssyk96kod = "6112" if Ssyk4_2012 == "6112"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "6113" if Ssyk4_2012 == "6113"
{txt}(26 real changes made)

{com}. replace ssyk96kod = "6121" if Ssyk4_2012 == "6121"
{txt}(43 real changes made)

{com}. replace ssyk96kod = "6122" if Ssyk4_2012 == "6121"
{txt}(43 real changes made)

{com}. replace ssyk96kod = "6129" if Ssyk4_2012 == "6122" | Ssyk4_2012 == "6129"
{txt}(9 real changes made)

{com}. replace ssyk96kod = "6130" if Ssyk4_2012 == "6130"
{txt}(55 real changes made)

{com}. replace ssyk96kod = "6140" if Ssyk4_2012 == "6210"
{txt}(37 real changes made)

{com}. replace ssyk96kod = "6151" if Ssyk4_2012 == "6221"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "6152" if Ssyk4_2012 == "6222"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "6153" if Ssyk4_2012 == "2135"
{txt}(20 real changes made)

{com}. replace ssyk96kod = "7111" if Ssyk4_2012 == "3121" | Ssyk4_2012 == "8111" | Ssyk4_2012 == "8115"
{txt}(22 real changes made)

{com}. replace ssyk96kod = "7112" if Ssyk4_2012 == "8116"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "7121" if Ssyk4_2012 == "3121" | Ssyk4_2012 == "7112" | Ssyk4_2012 == "7119"
{txt}(35 real changes made)

{com}. replace ssyk96kod = "7122" if Ssyk4_2012 == "7113" | Ssyk4_2012 == "7119"
{txt}(31 real changes made)

{com}. replace ssyk96kod = "7123" if Ssyk4_2012 == "3522" | Ssyk4_2012 == "7111" | Ssyk4_2012 == "7522"
{txt}(90 real changes made)

{com}. replace ssyk96kod = "7124" if Ssyk4_2012 == "7114"
{txt}(35 real changes made)

{com}. replace ssyk96kod = "7129" if Ssyk4_2012 == "7116" | Ssyk4_2012 == "7119"
{txt}(17 real changes made)

{com}. replace ssyk96kod = "7131" if Ssyk4_2012 == "7121"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "7132" if Ssyk4_2012 == "7122"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "7133" if Ssyk4_2012 == "7123"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "7134" if Ssyk4_2012 == "7124"
{txt}(1 real change made)

{com}. replace ssyk96kod = "7135" if Ssyk4_2012 == "7125" | Ssyk4_2012 == "7126"
{txt}(13 real changes made)

{com}. replace ssyk96kod = "7136" if Ssyk4_2012 == "7411"
{txt}(52 real changes made)

{com}. replace ssyk96kod = "7137" if Ssyk4_2012 == "5152"
{txt}(131 real changes made)

{com}. replace ssyk96kod = "7139" if Ssyk4_2012 == "7119" | Ssyk4_2012 == "7411" | Ssyk4_2012 == "7522"
{txt}(72 real changes made)

{com}. replace ssyk96kod = "7141" if Ssyk4_2012 == "3121" | Ssyk4_2012 == "7131"
{txt}(37 real changes made)

{com}. replace ssyk96kod = "7142" if Ssyk4_2012 == "7132"
{txt}(11 real changes made)

{com}. replace ssyk96kod = "7143" if Ssyk4_2012 == "7133" | Ssyk4_2012 == "7134"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "7211" if Ssyk4_2012 == "7211"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "7212" if Ssyk4_2012 == "7212"
{txt}(29 real changes made)

{com}. replace ssyk96kod = "7213" if Ssyk4_2012 == "7213" | Ssyk4_2012 == "7214"
{txt}(13 real changes made)

{com}. replace ssyk96kod = "7214" if Ssyk4_2012 == "7215"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "7215" if Ssyk4_2012 == "7215"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "7216" if Ssyk4_2012 == "7115"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "7221" if Ssyk4_2012 == "6121" | Ssyk4_2012 == "7221"
{txt}(43 real changes made)

{com}. replace ssyk96kod = "7222" if Ssyk4_2012 == "7222"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "7223" if Ssyk4_2012 == "7223"
{txt}(137 real changes made)

{com}. replace ssyk96kod = "7224" if Ssyk4_2012 == "7224"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "7231" if Ssyk4_2012 == "7231"
{txt}(38 real changes made)

{com}. replace ssyk96kod = "7232" if Ssyk4_2012 == "7232"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "7233" if Ssyk4_2012 == "7233"
{txt}(74 real changes made)

{com}. replace ssyk96kod = "7241" if Ssyk4_2012 == "7412"
{txt}(13 real changes made)

{com}. replace ssyk96kod = "7242" if Ssyk4_2012 == "7420"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "7243" if Ssyk4_2012 == "7413" | Ssyk4_2012 == "7420"
{txt}(20 real changes made)

{com}. replace ssyk96kod = "7311" if Ssyk4_2012 == "7311"
{txt}(8 real changes made)

{com}. replace ssyk96kod = "7312" if Ssyk4_2012 == "7319"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "7313" if Ssyk4_2012 == "7312"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "7322" if Ssyk4_2012 == "7319"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "7323" if Ssyk4_2012 == "7319"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "7324" if Ssyk4_2012 == "7319"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "7330" if Ssyk4_2012 == "2651" | Ssyk4_2012 == "7319"
{txt}(8 real changes made)

{com}. replace ssyk96kod = "7341" if Ssyk4_2012 == "7321"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "7342" if Ssyk4_2012 == "7321"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "7343" if Ssyk4_2012 == "2651" | Ssyk4_2012 == "7323"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "7344" if Ssyk4_2012 == "7322"
{txt}(8 real changes made)

{com}. replace ssyk96kod = "7411" if Ssyk4_2012 == "7611"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "7412" if Ssyk4_2012 == "7612" | Ssyk4_2012 == "9411"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "7413" if Ssyk4_2012 == "7613"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "7421" if Ssyk4_2012 == "2651" | Ssyk4_2012 =="7521" | Ssyk4_2012 == "7522"
{txt}(11 real changes made)

{com}. replace ssyk96kod = "7422" if Ssyk4_2012 == "7319"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "7431" if Ssyk4_2012 == "7531"
{txt}(1 real change made)

{com}. replace ssyk96kod = "7432" if Ssyk4_2012 == "7531"
{txt}(1 real change made)

{com}. replace ssyk96kod = "7433" if Ssyk4_2012 == "7531"
{txt}(1 real change made)

{com}. replace ssyk96kod = "7434" if Ssyk4_2012 == "7532"
{txt}(1 real change made)

{com}. replace ssyk96kod = "7435" if Ssyk4_2012 == "7532" | Ssyk4_2012 == "7533"
{txt}(1 real change made)

{com}. replace ssyk96kod = "7441" if Ssyk4_2012 == "7534" | Ssyk4_2012 == "8159"
{txt}(11 real changes made)

{com}. replace ssyk96kod = "7442" if Ssyk4_2012 == "7534"
{txt}(1 real change made)

{com}. replace ssyk96kod = "8111" if Ssyk4_2012 == "8112"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "8112" if Ssyk4_2012 == "8113"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "8121" if Ssyk4_2012 == "8193"
{txt}(19 real changes made)

{com}. replace ssyk96kod = "8122" if Ssyk4_2012 == "8122"
{txt}(24 real changes made)

{com}. replace ssyk96kod = "8123" if Ssyk4_2012 == "8129"
{txt}(44 real changes made)

{com}. replace ssyk96kod = "8124" if Ssyk4_2012 == "8129"
{txt}(44 real changes made)

{com}. replace ssyk96kod = "8125" if Ssyk4_2012 == "8129"
{txt}(44 real changes made)

{com}. replace ssyk96kod = "8130" if Ssyk4_2012 == "8189"
{txt}(14 real changes made)

{com}. replace ssyk96kod = "8141" if Ssyk4_2012 == "8173"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "8142" if Ssyk4_2012 == "8173"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "8143" if Ssyk4_2012 == "8171"
{txt}(12 real changes made)

{com}. replace ssyk96kod = "8144" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8172"
{txt}(76 real changes made)

{com}. replace ssyk96kod = "8150" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8192" | Ssyk4_2012 == "8199"
{txt}(71 real changes made)

{com}. replace ssyk96kod = "8160" if Ssyk4_2012 == "8191"
{txt}(28 real changes made)

{com}. replace ssyk96kod = "8170" if Ssyk4_2012 == "8199"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "8211" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "7223"
{txt}(183 real changes made)

{com}. replace ssyk96kod = "8212" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8114"
{txt}(47 real changes made)

{com}. replace ssyk96kod = "8221" if Ssyk4_2012 == "8131"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "8222" if Ssyk4_2012 == "8132"
{txt}(6 real changes made)

{com}. replace ssyk96kod = "8223" if Ssyk4_2012 == "7132" | Ssyk4_2012 == "8121"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "8224" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8132"
{txt}(52 real changes made)

{com}. replace ssyk96kod = "8229" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8132"
{txt}(52 real changes made)

{com}. replace ssyk96kod = "8231" if Ssyk4_2012 == "8141"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "8232" if Ssyk4_2012 == "8142"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "8240" if Ssyk4_2012 == "7523" | Ssyk4_2012 == "8174"
{txt}(17 real changes made)

{com}. replace ssyk96kod = "8251" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "7322"
{txt}(54 real changes made)

{com}. replace ssyk96kod = "8252" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "7323"
{txt}(47 real changes made)

{com}. replace ssyk96kod = "8253" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8143"
{txt}(57 real changes made)

{com}. replace ssyk96kod = "8261" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8159"
{txt}(56 real changes made)

{com}. replace ssyk96kod = "8262" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8159"
{txt}(56 real changes made)

{com}. replace ssyk96kod = "8263" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8159"
{txt}(56 real changes made)

{com}. replace ssyk96kod = "8264" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8151" | Ssyk4_2012 == "9120"
{txt}(54 real changes made)

{com}. replace ssyk96kod = "8265" if Ssyk4_2012 == "8159"
{txt}(10 real changes made)

{com}. replace ssyk96kod = "8269" if Ssyk4_2012 == "8159"
{txt}(10 real changes made)

{com}. replace ssyk96kod = "8271" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8161"
{txt}(57 real changes made)

{com}. replace ssyk96kod = "8272" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "7619" | Ssyk4_2012 == "8162"
{txt}(53 real changes made)

{com}. replace ssyk96kod = "8273" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8163"
{txt}(56 real changes made)

{com}. replace ssyk96kod = "8274" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8163"
{txt}(56 real changes made)

{com}. replace ssyk96kod = "8275" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "7619" | Ssyk4_2012 == "8169"
{txt}(53 real changes made)

{com}. replace ssyk96kod = "8276" if Ssyk4_2012 == "8169"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "8277" if Ssyk4_2012 == "8169"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "8278" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8169"
{txt}(51 real changes made)

{com}. replace ssyk96kod = "8279" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8169"
{txt}(51 real changes made)

{com}. replace ssyk96kod = "8281" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8211"
{txt}(77 real changes made)

{com}. replace ssyk96kod = "8282" if Ssyk4_2012 == "8212"
{txt}(34 real changes made)

{com}. replace ssyk96kod = "8283" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8213"
{txt}(90 real changes made)

{com}. replace ssyk96kod = "8284" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8214"
{txt}(65 real changes made)

{com}. replace ssyk96kod = "8285" if Ssyk4_2012 == "8219"
{txt}(21 real changes made)

{com}. replace ssyk96kod = "8290" if Ssyk4_2012 == "3122" | Ssyk4_2012 == "8181" | Ssyk4_2012 == "8189" | Ssyk4_2012 == "8213" | Ssyk4_2012 == "8219"
{txt}(137 real changes made)

{com}. replace ssyk96kod = "8311" if Ssyk4_2012 == "8311"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "8312" if Ssyk4_2012 == "8312"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "8321" if Ssyk4_2012 == "8321" | Ssyk4_2012 == "8329"
{txt}(48 real changes made)

{com}. replace ssyk96kod = "8322" if Ssyk4_2012 == "8331"
{txt}(81 real changes made)

{com}. replace ssyk96kod = "8323" if Ssyk4_2012 == "8332"
{txt}(79 real changes made)

{com}. replace ssyk96kod = "8331" if Ssyk4_2012 == "8341"
{txt}(18 real changes made)

{com}. replace ssyk96kod = "8332" if Ssyk4_2012 == "8342"
{txt}(12 real changes made)

{com}. replace ssyk96kod = "8333" if Ssyk4_2012 == "8343"
{txt}(3 real changes made)

{com}. replace ssyk96kod = "8334" if Ssyk4_2012 == "8344"
{txt}(26 real changes made)

{com}. replace ssyk96kod = "8340" if Ssyk4_2012 == "8350"
{txt}(2 real changes made)

{com}. replace ssyk96kod = "9110" if Ssyk4_2012 == "9520"
{txt}(0 real changes made)

{com}. replace ssyk96kod = "9121" if Ssyk4_2012 == "9111" | Ssyk4_2012 == "9119"
{txt}(47 real changes made)

{com}. replace ssyk96kod = "9122" if Ssyk4_2012 == "5151" | Ssyk4_2012 == "9111" | Ssyk4_2012 == "9120"
{txt}(49 real changes made)

{com}. replace ssyk96kod = "9123" if Ssyk4_2012 == "9120"
{txt}(1 real change made)

{com}. replace ssyk96kod = "9130" if Ssyk4_2012 == "9411" | Ssyk4_2012 == "9412"
{txt}(70 real changes made)

{com}. replace ssyk96kod = "9141" if Ssyk4_2012 == "9621" | Ssyk4_2012 == "9629"
{txt}(49 real changes made)

{com}. replace ssyk96kod = "9142" if Ssyk4_2012 == "4430" | Ssyk4_2012 == "9622" | Ssyk4_2012 == "9629"
{txt}(127 real changes made)

{com}. replace ssyk96kod = "9143" if Ssyk4_2012 == "9629"
{txt}(29 real changes made)

{com}. replace ssyk96kod = "9150" if Ssyk4_2012 == "9610" | Ssyk4_2012 == "9629"
{txt}(57 real changes made)

{com}. replace ssyk96kod = "9190" if Ssyk4_2012 == "9120" | Ssyk4_2012 == "9320"
{txt}(16 real changes made)

{com}. replace ssyk96kod = "9210" if Ssyk4_2012 == "9210"
{txt}(4 real changes made)

{com}. replace ssyk96kod = "9310" if Ssyk4_2012 == "9310"
{txt}(5 real changes made)

{com}. replace ssyk96kod = "9320" if Ssyk4_2012 == "9320"
{txt}(15 real changes made)

{com}. replace ssyk96kod = "9330" if Ssyk4_2012 == "8329" | Ssyk4_2012 == "9331" | Ssyk4_2012 == "9332"
{txt}(34 real changes made)

{com}. 
{txt}end of do-file

{com}. 
. replace Ssyk4= ssyk96kod if Ssyk4==""
{txt}(12,671 real changes made)

{com}. replace Ssyk4="" if Ssyk4=="0000" |Ssyk4=="****" 
{txt}(31,582 real changes made)

{com}. sort p_id year
{txt}
{com}. foreach var in Ssyk4{c -(}
{txt}  2{com}.         replace `var'="" if ForvErs<(pbb*3.5) |politician==1
{txt}  3{com}.         replace `var'=`var'[_n-1] if `var'=="" &  p_id==p_id[_n-1]
{txt}  4{com}. {c )-}
{txt}(30,992 real changes made)
(31,827 real changes made)

{com}. foreach var in cap_exec sector    {c -(}
{txt}  2{com}.         replace `var'=`var'[_n-1] if `var'==. &  p_id==p_id[_n-1]
{txt}  3{com}. {c )-}
{txt}(28,683 real changes made)
(28,683 real changes made)

{com}. keep if year == 2015 
{txt}(183,223 observations deleted)

{com}. duplicates drop p_id year, force

{p 0 4}{txt}Duplicates in terms of {res} p_id year{p_end}

{txt}(0 observations are duplicates)

{com}. gen sex= 1 if Kon=="2"
{txt}(7,637 missing values generated)

{com}. replace sex=-1 if Kon=="1"
{txt}(7,637 real changes made)

{com}. 
. 
. drop ssyk96kod
{txt}
{com}. gen ssyk96kod = substr(Ssyk4,1,3)
{txt}(1,355 missing values generated)

{com}. 
. merge m:1 ssyk96kod using intcomp_ssyk.dta
{res}{txt}{p 0 7 2}
(variable
{bf:ssyk96kod} was {bf:str3}, now {bf:str4} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               7
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}               7{txt}  (_merge==2)

{col 5}Matched{col 30}{res}          13,462{txt}  (_merge==3)
{col 5}{hline 41}

{com}. drop ssyk96kod
{txt}
{com}. 
. 
. *Define years of education
. replace Sun2000niva="" if Sun2000niva=="*" | Sun2000niva=="-"
{txt}(0 real changes made)

{com}. destring Sun2000niva, replace force
{txt}Sun2000niva: all characters numeric; {res}replaced {txt}as {res}int
{txt}(7 missing values generated)
{res}{txt}
{com}. replace  Sun2000niva=. if Sun2000niva>=999
{txt}(12 real changes made, 12 to missing)

{com}. gen educ_year=.
{txt}(13,469 missing values generated)

{com}. replace educ_year= 7.5 if Sun2000niva>=100 & Sun2000niva<200
{txt}(287 real changes made)

{com}. replace educ_year= 9.4 if Sun2000niva>=200 & Sun2000niva<300
{txt}(705 real changes made)

{com}. replace educ_year= 11.2 if Sun2000niva>=300 & Sun2000niva<330
{txt}(2,892 real changes made)

{com}. replace educ_year= 12.4 if Sun2000niva>=330 & Sun2000niva<400
{txt}(2,408 real changes made)

{com}. replace educ_year= 14.2 if Sun2000niva>=410& Sun2000niva<530
{txt}(2,766 real changes made)

{com}. replace educ_year= 17 if Sun2000niva>=530 & Sun2000niva<600
{txt}(4,195 real changes made)

{com}. replace educ_year= 20.4 if Sun2000niva>=600 & Sun2000niva<=999
{txt}(197 real changes made)

{com}. drop Sun*
{txt}
{com}. 
. 
. gen int eduyrs = educ_year
{txt}(19 missing values generated)

{com}. gen education = .
{txt}(13,469 missing values generated)

{com}. replace education = -1 if eduyrs<10
{txt}(992 real changes made)

{com}. replace education = -.5 if eduyrs==11
{txt}(2,892 real changes made)

{com}. replace education = -.25 if eduyrs==12
{txt}(2,408 real changes made)

{com}. replace education = 0.5 if eduyrs==14
{txt}(2,766 real changes made)

{com}. replace education = 1 if eduyrs>15
{txt}(4,411 real changes made)

{com}. replace education = . if missing(eduyrs)
{txt}(19 real changes made, 19 to missing)

{com}. gen  ssyk96kod = Ssyk4
{txt}(1,362 missing values generated)

{com}. drop _merge
{txt}
{com}. joinby ssyk96kod using "SSYK96_Onet.dta", unmatched(master)
{txt}
{com}. drop _merge
{txt}
{com}. foreach var of varlist ConMacProc DocRecInfo HandMoveObj InterComp AdminAct{c -(}
{txt}  2{com}.         gen `var'_ = 100-`var'
{txt}  3{com}. {c )-}
{txt}(260 missing values generated)
(260 missing values generated)
(260 missing values generated)
(260 missing values generated)
(260 missing values generated)

{com}. egen galtan = rowmean(ConcOther AssCareOther NegConSolv ServOriCare SocPercep ConMacProc_ DocRecInfo_ HandMoveObj_ InterComp_ AdminAct_) 
{txt}(260 missing values generated)

{com}. replace galtan=. if Ssyk4==""
{txt}(1,362 real changes made, 1,362 to missing)

{com}. 
. foreach var in   stdoffshore galtan{c -(}
{txt}  2{com}.         replace `var'=. if Ssyk4==""
{txt}  3{com}.         fastxtile `var'_pct = `var', n(100)
{txt}  4{com}.         replace  `var'_pct = (`var'_pct-50.5)/49.5
{txt}  5{com}. {c )-}
{txt}(6 real changes made, 6 to missing)
variable {bf}{res}stdoffshore_pct{sf}{txt} was {bf}{res}byte{sf}{txt} now {bf}{res}float{sf}
{txt}(12,032 real changes made)
(0 real changes made)
variable {bf}{res}galtan_pct{sf}{txt} was {bf}{res}byte{sf}{txt} now {bf}{res}float{sf}
{txt}(11,847 real changes made)

{com}. gen y = galtan_pct/2 + education/4 +sex/4
{txt}(1,628 missing values generated)

{com}. gen x = stdoffshore_pct/3+ sector/3 + cap_exec_alt/3 
{txt}(4,111 missing values generated)

{com}. 
. joinby p_id  using "Kolfu survey.dta", unmatched(master)
{txt}
{com}. 
. foreach var in Q13 Q14 Q16{c -(}
{txt}  2{com}.         replace `var'= substr(`var', 1, 2)
{txt}  3{com}. {c )-}
{txt}(1,940 real changes made)
(779 real changes made)
(2,568 real changes made)

{com}. destring q17* Q13* Q14* Q16*, replace force
{txt}q17_1: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_2: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_3: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_4: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_5: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_6: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_7: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_8: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_9: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_10: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_11: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_12: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_13: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_14: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_15: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_16: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_17: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_18: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_19: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_20: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_21: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_22: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}q17_23: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(13469 missing values generated)
{res}{txt}Q13: all characters numeric; {res}replaced {txt}as {res}byte
{txt}(5434 missing values generated)
{res}{txt}Q14: all characters numeric; {res}replaced {txt}as {res}byte
{txt}(5480 missing values generated)
{res}{txt}Q16: all characters numeric; {res}replaced {txt}as {res}byte
{txt}(5501 missing values generated)
{res}{txt}
{com}. 
. gen  q17_12_rev=6-q17_12
{txt}(13,469 missing values generated)

{com}. gen  q17_13_rev=6-q17_13
{txt}(13,469 missing values generated)

{com}. gen x_pos =  (Q13/5-1)
{txt}(5,434 missing values generated)

{com}. gen y_pos = ( (Q14/5-1)+(Q16/5-1) )/2
{txt}(5,569 missing values generated)

{com}. 
. egen std_y_pos=std(y_pos)
{txt}(5,569 missing values generated)

{com}. egen std_x_pos=std(x_pos)
{txt}(5,434 missing values generated)

{com}. foreach var in x_pos y_pos  {c -(}
{txt}  2{com}.         gen gr_`var'_8=(int(4*(`var'+0.0000001))-0.5)/4 if `var'<0
{txt}  3{com}.         replace gr_`var'_8=(int(4*(`var'-0.0000001))+0.5)/4  if `var'>=0
{txt}  4{com}. {c )-}
{txt}(9,759 missing values generated)
(4,325 real changes made)
(12,104 missing values generated)
(6,535 real changes made)

{com}. 
. *create categorical variable for mode of recruitment 
. gen recruit="own" if Q11=="Eget initiativ"
{txt}(9,096 missing values generated)

{com}. replace recruit="party" if Q11=="Kontaktad av politiskt parti"
{txt}variable {bf}{res}recruit{sf}{txt} was {bf}{res}str3{sf}{txt} now {bf}{res}str5{sf}
{txt}(1,283 real changes made)

{com}. replace recruit="asked other" if substr(Q11,1,4)=="Till"
{txt}variable {bf}{res}recruit{sf}{txt} was {bf}{res}str5{sf}{txt} now {bf}{res}str11{sf}
{txt}(2,390 real changes made)

{com}. 
. *Create party initial
. gen party_in="S" if substr(v09_Parti9,1,3)=="Soc"
{txt}(8,788 missing values generated)

{com}. replace party_in="G" if substr(v09_Parti9,1,3)=="Mil"
{txt}(790 real changes made)

{com}. replace party_in="Cons" if substr(v09_Parti9,1,3)=="Mod"
{txt}variable {bf}{res}party_in{sf}{txt} was {bf}{res}str1{sf}{txt} now {bf}{res}str4{sf}
{txt}(2,555 real changes made)

{com}. replace party_in="SD" if substr(v09_Parti9,1,3)=="Sve"
{txt}(1,279 real changes made)

{com}. gen parti_initial="S" if substr(v09_Parti9,1,3)=="Soc"
{txt}(8,788 missing values generated)

{com}. replace parti_initial="G" if substr(v09_Parti9,1,3)=="Mil"
{txt}(790 real changes made)

{com}. replace parti_initial="M" if substr(v09_Parti9,1,3)=="Mod"
{txt}(2,555 real changes made)

{com}. replace parti_initial="B" if substr(v09_Parti9,1,3)=="Sve"
{txt}(1,279 real changes made)

{com}. gen valar=2014
{txt}
{com}. drop _merge
{txt}
{com}. *add data on previous terms nominated to council
. joinby p_id  using "nom_prev.dta", unmatched(master)
{txt}
{com}. destring Q10, force gen(memb_year)
{txt}Q10: all characters numeric; memb_year {res}generated {txt}as {res}int
{txt}(5159 missing values generated)
{res}{txt}
{com}. gen memb_time=2017- memb_year
{txt}(5,159 missing values generated)

{com}. *drop regional councilors
. drop if Q01=="Landstings-/regionfullmäktige"
{txt}(638 observations deleted)

{com}. 
. cd "\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"
{res}\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission
{txt}
{com}. *Figure 3
. preserve
{txt}
{com}. collapse y_pos x_pos , by(party_in )
{res}{txt}
{com}. twoway  (scatter y x if party_in=="S",  msize(zero) mlabel(party_in) mlabsize(medium) msymbol(circle) mlabposition(0) mfcolor(none) mlabcolor(cranberry)) ///
>   (scatter y x if party_in=="Cons",  msize(zero) mlabel(party_in) mlabsize(medium) msymbol(circle) mlabposition(0) mfcolor(none) mlabcolor(navy)) ///
>    (scatter y x if party_in=="G",  msize(zero) mlabel(party_in) mlabsize(medium) msymbol(circle) mfcolor(none) mlabposition(0) mlabcolor(forest_green)) ///
>     (scatter y x if party_=="SD",  msize(zero) mlabel(party_in) mlabsize(medium) msymbol(circle) mlabposition(0) mfcolor(none) mlabcolor(gold))  ///
> , scheme(s1color)  ylabel(-1(.5)1)  xlabel(-1(.5)1)  ///
>  xline(0, lpattern(dash) lcolor(black)) yline(0, lpattern(dash) lcolor(black))  ///
>  title(Self-Reported Ideology of Councilors 2017) ytitle( Authoritarian-Libertarian) xtitle(Left-Right) legend(off) ysize(5) xsize(5.5)
{res}{txt}
{com}. 
. graph save Figure_3, replace
{res}{txt}file {bf:Figure_3.gph} saved

{com}. restore
{txt}
{com}. 
. ****Figure 4
.  binscatter x_pos x   , n(50) scheme(s1color) ylabel(, angle(horizontal) grid)   title(Left-Right) xtitle( Labor Market Experience Index) ytitle(Self-reported Ideology)
{res}{txt}
{com}.   graph save xpos_x, replace
{res}{txt}file {bf:xpos_x.gph} saved

{com}.     
.         binscatter y_pos y, n(50) scheme(s1color) title(Authoritarian-Libertarian) ylabel(, angle(horizontal) grid) xtitle(Labor Market Experience Index) ytitle( Self-reported Ideology)  
{res}{txt}
{com}.     graph save ypos_y, replace
{res}{txt}file {bf:ypos_y.gph} saved

{com}.      
.    graph combine ypos_y.gph   xpos_x.gph,col(2) row(1) scheme(s1mono) ysize(6) xsize(20) iscale(1.5) 
{res}{txt}
{com}.  graph save Figure_4.gph, replace
{res}{txt}file {bf:Figure_4.gph} saved

{com}. *****Table W1 and Figure W2
. *log using Table_W1, replace
. bysort party_in: sum y x std_y std_x if y!=. & x!=.

{txt}{hline}
-> party_in = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      2,747    .0690908    .4842736   -.989899    .989899
{txt}{space 11}x {c |}{res}      2,747   -.0876739    .4735221  -.9848485   .9730639
{txt}{space 3}std_y_pos {c |}{res}      1,625    .3017136    .8503268  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}      1,649     .126492    .9557189  -1.716828   1.868916

{txt}{hline}
-> party_in = Cons

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      1,582    .0242245    .4451292         -1    .989899
{txt}{space 11}x {c |}{res}      1,582     .014579    .4670569  -.9949495    .979798
{txt}{space 3}std_y_pos {c |}{res}        855   -.4341935    .8929131  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        867    1.245236    .4299526  -1.716828   1.868916

{txt}{hline}
-> party_in = G

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        539    .2086191    .4439307  -.9393939    .969697
{txt}{space 11}x {c |}{res}        539   -.1689748    .4409404  -.9612795    .946128
{txt}{space 3}std_y_pos {c |}{res}        356    1.047707    .5785412  -1.533687   1.546945
{txt}{space 3}std_x_pos {c |}{res}        353   -.3536362    .5013485  -1.716828   1.151767

{txt}{hline}
-> party_in = S

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      3,178    .0098749    .5211511         -1    .989899
{txt}{space 11}x {c |}{res}      3,178   -.1222292    .4732971   -.979798    .979798
{txt}{space 3}std_y_pos {c |}{res}      1,903    .1746761    .7042128  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}      1,934    -.773114    .5355458  -1.716828   1.868916

{txt}{hline}
-> party_in = SD

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        656   -.3410996    .4676379         -1    .989899
{txt}{space 11}x {c |}{res}        656   -.0119513    .4701784   -.979798   .9730639
{txt}{space 3}std_y_pos {c |}{res}        248   -1.979919    .7243176  -3.192488  -.1118566
{txt}{space 3}std_x_pos {c |}{res}        263    .5764118    .5746398  -.2825308   1.868916

{txt}
{com}. bysort party_in recruit: sum y x std_y std_x if y!=. & x!=.

{txt}{hline}
-> party_in = , recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      1,111    .0480304    .4981423   -.989899    .989899
{txt}{space 11}x {c |}{res}      1,111   -.0483336    .4817027    -.96633     .96633
{txt}{space 3}std_y_pos {c |}{res}         69    .2796618    .8307201   -2.00763   1.546945
{txt}{space 3}std_x_pos {c |}{res}         69    .2787162    .8793534  -1.716828   1.868916

{txt}{hline}
-> party_in = , recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        529     .082529    .4657895  -.9393939    .989899
{txt}{space 11}x {c |}{res}        529   -.1031391    .4558415   -.956229   .9730639
{txt}{space 3}std_y_pos {c |}{res}        503    .3239262    .7391463  -2.481573   1.546945
{txt}{space 3}std_x_pos {c |}{res}        508    .3428569    .7960406  -1.716828   1.868916

{txt}{hline}
-> party_in = , recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        771    .0956583    .4728346   -.969697    .989899
{txt}{space 11}x {c |}{res}        771   -.1460127    .4672478  -.9848485     .96633
{txt}{space 3}std_y_pos {c |}{res}        729    .3549353      .89925  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        747    -.090043    1.063456  -1.716828   1.868916

{txt}{hline}
-> party_in = , recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        336    .0566077    .4906958   -.989899    .969697
{txt}{space 11}x {c |}{res}        336   -.0595388    .4750444  -.9511784    .946128
{txt}{space 3}std_y_pos {c |}{res}        324    .1521766    .8881141  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        325    .2536759    .8279108  -1.716828   1.868916

{txt}{hline}
-> party_in = Cons, recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        686     .033974    .4567453         -1    .989899
{txt}{space 11}x {c |}{res}        686    .0262219     .475379  -.9949495    .979798
{txt}{space 3}std_y_pos {c |}{res}         27   -.5594697    1.014652  -3.192488   .8360299
{txt}{space 3}std_x_pos {c |}{res}         27     1.21817    .3150724   .7931925   1.868916

{txt}{hline}
-> party_in = Cons, recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        280    .0042253    .4324253  -.8686869    .969697
{txt}{space 11}x {c |}{res}        280    .0004269    .4786744  -.9696969    .946128
{txt}{space 3}std_y_pos {c |}{res}        256   -.3645647    .8673154  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        262     1.23662    .4112575  -.2825308   1.868916

{txt}{hline}
-> party_in = Cons, recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        488    .0327727    .4192848  -.9292929    .989899
{txt}{space 11}x {c |}{res}        488    .0136509    .4438889  -.9208754    .979798
{txt}{space 3}std_y_pos {c |}{res}        454   -.4923684    .9055102  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        457    1.264753    .4513918  -1.716828   1.868916

{txt}{hline}
-> party_in = Cons, recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        128   -.0168679    .5030856  -.9595959   .9292929
{txt}{space 11}x {c |}{res}        128   -.0133233    .4856161  -.9259259    .979798
{txt}{space 3}std_y_pos {c |}{res}        118   -.3327624    .8595821  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        121    1.196218    .4077099   .0760437   1.868916

{txt}{hline}
-> party_in = G, recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        179    .2155917    .4528512  -.9393939    .969697
{txt}{space 11}x {c |}{res}        179   -.1691496     .451172  -.9612795    .946128
{txt}{space 3}std_y_pos {c |}{res}          8    1.280352    .3454426   .5990584   1.546945
{txt}{space 3}std_x_pos {c |}{res}          8   -.5962834    .6192179  -1.716828   .0760437

{txt}{hline}
-> party_in = G, recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}         68    .2706848    .4443238  -.8686869   .9292929
{txt}{space 11}x {c |}{res}         68    -.105615    .3936387  -.8602694    .946128
{txt}{space 3}std_y_pos {c |}{res}         64    .9804346    .6342014  -1.059743   1.546945
{txt}{space 3}std_x_pos {c |}{res}         63    -.345139    .4927466  -1.716828   .7931925

{txt}{hline}
-> party_in = G, recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        261    .1867236    .4439083      -.875    .969697
{txt}{space 11}x {c |}{res}        261   -.1736135    .4418487  -.9511784    .946128
{txt}{space 3}std_y_pos {c |}{res}        253    1.052395    .5785537  -1.533687   1.546945
{txt}{space 3}std_x_pos {c |}{res}        251   -.3368169    .4969831  -1.716828   1.151767

{txt}{hline}
-> party_in = G, recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}         31    .2165608    .3942723  -.5719697   .8989899
{txt}{space 11}x {c |}{res}         31    -.267894    .4706712   -.946128   .7912458
{txt}{space 3}std_y_pos {c |}{res}         31     1.08829    .5005863  -.1118566   1.546945
{txt}{space 3}std_x_pos {c |}{res}         31   -.4444676    .5224099  -1.716828   .4346181

{txt}{hline}
-> party_in = S, recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      1,272    .0229193    .5298302         -1    .989899
{txt}{space 11}x {c |}{res}      1,272   -.0965764    .4852721  -.9696969    .979798
{txt}{space 3}std_y_pos {c |}{res}         95    .1400817    .7781625  -2.481573   1.546945
{txt}{space 3}std_x_pos {c |}{res}         96   -.8428033    .5427151  -1.716828   .7931925

{txt}{hline}
-> party_in = S, recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        686   -.0008881    .5312488         -1    .989899
{txt}{space 11}x {c |}{res}        686   -.1462143    .4785608    -.96633    .979798
{txt}{space 3}std_y_pos {c |}{res}        649    .1992371    .6388464  -2.244601   1.546945
{txt}{space 3}std_x_pos {c |}{res}        661   -.7761809    .5486557  -1.716828   1.510341

{txt}{hline}
-> party_in = S, recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        932   -.0143143    .5003699         -1    .989899
{txt}{space 11}x {c |}{res}        932   -.1298861    .4510054   -.979798    .979798
{txt}{space 3}std_y_pos {c |}{res}        882    .1689091    .7415411  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        896   -.7787722    .5135653  -1.716828   1.868916

{txt}{hline}
-> party_in = S, recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        288    .0561781    .5219756   -.919192    .989899
{txt}{space 11}x {c |}{res}        288   -.1536195    .4742631   -.979798   .8063973
{txt}{space 3}std_y_pos {c |}{res}        277    .1473579      .70366   -2.00763   1.546945
{txt}{space 3}std_x_pos {c |}{res}        281   -.7240495    .5685592  -1.716828   1.868916

{txt}{hline}
-> party_in = SD, recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        393   -.3458022    .4698501         -1    .989899
{txt}{space 11}x {c |}{res}        393   -.0254067    .4807645   -.979798   .9730639
{txt}{space 3}std_y_pos {c |}{res}          7   -1.533687    .5641053  -2.481573  -.8227716
{txt}{space 3}std_x_pos {c |}{res}          8    .2553309    .5071008  -.2825308   1.151767

{txt}{hline}
-> party_in = SD, recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}         33   -.2516644    .4619127  -.8888889   .7272727
{txt}{space 11}x {c |}{res}         33   -.0609632    .4378935  -.8198653   .8063973
{txt}{space 3}std_y_pos {c |}{res}         29   -2.040316    .7213446  -3.192488  -.1118566
{txt}{space 3}std_x_pos {c |}{res}         33    .5324111    .5617782  -.2825308   1.868916

{txt}{hline}
-> party_in = SD, recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        214   -.3404961    .4691617  -.9595959   .9292929
{txt}{space 11}x {c |}{res}        214    .0148132    .4582185  -.9511784   .8131313
{txt}{space 3}std_y_pos {c |}{res}        200   -1.998151    .7201199  -3.192488  -.1118566
{txt}{space 3}std_x_pos {c |}{res}        206    .5964988    .5857359  -.2825308   1.868916

{txt}{hline}
-> party_in = SD, recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}         16   -.4181266    .4180895  -.8989899   .6167929
{txt}{space 11}x {c |}{res}         16    .0616583    .4431552  -.8602694   .8131313
{txt}{space 3}std_y_pos {c |}{res}         12   -1.790406    .8481667  -2.718545  -.3488283
{txt}{space 3}std_x_pos {c |}{res}         16    .5690835    .4698101   .0760437   1.510341

{txt}
{com}. bysort party_in: sum y x std_y std_x 

{txt}{hline}
-> party_in = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      3,528    .0537958     .485969         -1    .989899
{txt}{space 11}x {c |}{res}      2,797   -.0888301    .4733187  -.9848485   .9730639
{txt}{space 3}std_y_pos {c |}{res}      2,336    .2381229    .8695044  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}      2,374    .1112365    .9440938  -1.716828   1.868916

{txt}{hline}
-> party_in = Cons

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      2,085    .0276394    .4428981         -1    .989899
{txt}{space 11}x {c |}{res}      1,625    .0169593    .4679525  -.9949495    .979798
{txt}{space 3}std_y_pos {c |}{res}      1,366   -.4522215    .8815006  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}      1,385    1.235909    .4415605  -1.716828   1.868916

{txt}{hline}
-> party_in = G

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        667    .2002512    .4471459         -1    .969697
{txt}{space 11}x {c |}{res}        550   -.1667646    .4437994  -.9612795    .946128
{txt}{space 3}std_y_pos {c |}{res}        485    1.052969    .5713468  -1.770658   1.546945
{txt}{space 3}std_x_pos {c |}{res}        485   -.3690322    .5397783  -1.716828   1.868916

{txt}{hline}
-> party_in = S

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      4,011    .0028482     .516466         -1    .989899
{txt}{space 11}x {c |}{res}      3,234   -.1230674    .4728964   -.979798    .979798
{txt}{space 3}std_y_pos {c |}{res}      2,640    .1333731     .723874  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}      2,682   -.7507364    .5503356  -1.716828   1.868916

{txt}{hline}
-> party_in = SD

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        977   -.3209649    .4706173         -1    .989899
{txt}{space 11}x {c |}{res}        658   -.0122348    .4694908   -.979798   .9730639
{txt}{space 3}std_y_pos {c |}{res}        479   -1.935401    .7666892  -3.192488   .3620867
{txt}{space 3}std_x_pos {c |}{res}        498    .6254258    .6283135  -1.716828   1.868916

{txt}
{com}. bysort party_in recruit: sum y x std_y std_x

{txt}{hline}
-> party_in = , recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      1,419    .0314046    .5002528   -.989899    .989899
{txt}{space 11}x {c |}{res}      1,129   -.0487485    .4822061    -.96633     .96633
{txt}{space 3}std_y_pos {c |}{res}         98    .1468777    .9479396  -2.718545   1.546945
{txt}{space 3}std_x_pos {c |}{res}         98    .2626487     .887676  -1.716828   1.868916

{txt}{hline}
-> party_in = , recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        673    .0832855     .465181  -.9393939    .989899
{txt}{space 11}x {c |}{res}        538   -.1056757    .4558056   -.956229   .9730639
{txt}{space 3}std_y_pos {c |}{res}        695    .2509316    .7865165  -2.481573   1.546945
{txt}{space 3}std_x_pos {c |}{res}        704    .3139048     .780554  -1.716828   1.868916

{txt}{hline}
-> party_in = , recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      1,006    .0767673    .4700148         -1    .989899
{txt}{space 11}x {c |}{res}        790   -.1476985    .4652831  -.9848485     .96633
{txt}{space 3}std_y_pos {c |}{res}      1,071    .3094263    .8830223  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}      1,095   -.1106115     1.04318  -1.716828   1.868916

{txt}{hline}
-> party_in = , recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        430    .0277895    .5030106   -.989899    .969697
{txt}{space 11}x {c |}{res}        340   -.0584868    .4756954  -.9511784    .946128
{txt}{space 3}std_y_pos {c |}{res}        472    .0764153    .9167517  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        477    .2902863     .819246  -1.716828   1.868916

{txt}{hline}
-> party_in = Cons, recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        877     .035486    .4526173         -1    .989899
{txt}{space 11}x {c |}{res}        708    .0277445    .4765298  -.9949495    .979798
{txt}{space 3}std_y_pos {c |}{res}         40    -.384374    .9667627  -3.192488   1.073002
{txt}{space 3}std_x_pos {c |}{res}         41    1.265461     .344297   .7931925   1.868916

{txt}{hline}
-> party_in = Cons, recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        366   -.0027909    .4270168  -.8787879    .969697
{txt}{space 11}x {c |}{res}        285    .0039813    .4808531  -.9696969    .946128
{txt}{space 3}std_y_pos {c |}{res}        379   -.3807163    .8654816  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        386    1.230728    .4279087  -.2825308   1.868916

{txt}{hline}
-> party_in = Cons, recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        656    .0335809    .4238269  -.9292929    .989899
{txt}{space 11}x {c |}{res}        500    .0158687    .4429166  -.9208754    .979798
{txt}{space 3}std_y_pos {c |}{res}        739   -.5155742     .892658  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        746    1.256551    .4498002  -1.716828   1.868916

{txt}{hline}
-> party_in = Cons, recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        186    .0295665    .4915841  -.9595959   .9292929
{txt}{space 11}x {c |}{res}        132   -.0087364    .4888133  -.9259259    .979798
{txt}{space 3}std_y_pos {c |}{res}        208   -.3704747    .8413376  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}        212    1.166989    .4488501  -1.358254   1.868916

{txt}{hline}
-> party_in = G, recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        219    .2050845    .4613311  -.9393939    .969697
{txt}{space 11}x {c |}{res}        184   -.1655321    .4590174  -.9612795    .946128
{txt}{space 3}std_y_pos {c |}{res}         15    1.246781    .4149824   .3620867   1.546945
{txt}{space 3}std_x_pos {c |}{res}         15   -.5454853    .5499626  -1.716828   .0760437

{txt}{hline}
-> party_in = G, recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}         80    .2432213    .4410039  -.8686869   .9292929
{txt}{space 11}x {c |}{res}         69   -.1154541    .3991897  -.8602694    .946128
{txt}{space 3}std_y_pos {c |}{res}         83    .9844941    .6396317  -1.059743   1.546945
{txt}{space 3}std_x_pos {c |}{res}         83   -.3775746    .5165498  -1.716828   .7931925

{txt}{hline}
-> party_in = G, recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        323    .1865716    .4444717         -1    .969697
{txt}{space 11}x {c |}{res}        266   -.1691413    .4412245  -.9511784    .946128
{txt}{space 3}std_y_pos {c |}{res}        338    1.047061    .5736665  -1.770658   1.546945
{txt}{space 3}std_x_pos {c |}{res}        338   -.3504265    .5496605  -1.716828   1.868916

{txt}{hline}
-> party_in = G, recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}         45    .1985269    .4148687   -.761995   .8989899
{txt}{space 11}x {c |}{res}         31    -.267894    .4706712   -.946128   .7912458
{txt}{space 3}std_y_pos {c |}{res}         49     1.15038    .4495902  -.1118566   1.546945
{txt}{space 3}std_x_pos {c |}{res}         49   -.4288877    .5066694  -1.716828   .4346181

{txt}{hline}
-> party_in = S, recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      1,564    .0151196     .526476         -1    .989899
{txt}{space 11}x {c |}{res}      1,295   -.0963548    .4850838  -.9696969    .979798
{txt}{space 3}std_y_pos {c |}{res}        131    .1214971    .7930505  -2.481573   1.546945
{txt}{space 3}std_x_pos {c |}{res}        132   -.7959441    .5711698  -1.716828   1.151767

{txt}{hline}
-> party_in = S, recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        877   -.0055292    .5260819         -1    .989899
{txt}{space 11}x {c |}{res}        697   -.1506215    .4763747    -.96633    .979798
{txt}{space 3}std_y_pos {c |}{res}        875    .1475935    .6821875  -2.955516   1.546945
{txt}{space 3}std_x_pos {c |}{res}        892   -.7500443    .5557955  -1.716828   1.510341

{txt}{hline}
-> party_in = S, recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}      1,195   -.0093107    .4925071         -1    .989899
{txt}{space 11}x {c |}{res}        949   -.1309672    .4506077   -.979798    .979798
{txt}{space 3}std_y_pos {c |}{res}      1,246    .1382379    .7507286  -3.192488   1.546945
{txt}{space 3}std_x_pos {c |}{res}      1,263    -.772838    .5221016  -1.716828   1.868916

{txt}{hline}
-> party_in = S, recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        375    .0100067    .5268995   -.949495    .989899
{txt}{space 11}x {c |}{res}        293   -.1499983    .4766956   -.979798   .8131313
{txt}{space 3}std_y_pos {c |}{res}        388    .0896914    .7037689   -2.00763   1.546945
{txt}{space 3}std_x_pos {c |}{res}        395   -.6665231    .6094039  -1.716828   1.868916

{txt}{hline}
-> party_in = SD, recruit = 

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        581   -.3200649    .4728127         -1    .989899
{txt}{space 11}x {c |}{res}        395   -.0258109    .4795771   -.979798   .9730639
{txt}{space 3}std_y_pos {c |}{res}         18   -1.994465    .9460456  -3.192488  -.3488283
{txt}{space 3}std_x_pos {c |}{res}         19    .4723628    .7260061  -.6411052   1.868916

{txt}{hline}
-> party_in = SD, recruit = asked other

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}         39   -.2834596    .4412126  -.8888889   .7272727
{txt}{space 11}x {c |}{res}         33   -.0609632    .4378935  -.8198653   .8063973
{txt}{space 3}std_y_pos {c |}{res}         43   -2.046207    .6955724  -3.192488  -.1118566
{txt}{space 3}std_x_pos {c |}{res}         47    .4651351    .5330581  -.6411052   1.868916

{txt}{hline}
-> party_in = SD, recruit = own

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}        326   -.3293983    .4692808         -1    .989899
{txt}{space 11}x {c |}{res}        214    .0148132    .4582185  -.9511784   .8131313
{txt}{space 3}std_y_pos {c |}{res}        382   -1.937531    .7656724  -3.192488   .3620867
{txt}{space 3}std_x_pos {c |}{res}        390    .6580376      .62494  -.6411052   1.868916

{txt}{hline}
-> party_in = SD, recruit = party

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 11}y {c |}{res}         31   -.2963302    .4979076  -.8989899   .8989899
{txt}{space 11}x {c |}{res}         16    .0616583    .4431552  -.8602694   .8131313
{txt}{space 3}std_y_pos {c |}{res}         36   -1.750911    .7607913  -2.955516  -.3488283
{txt}{space 3}std_x_pos {c |}{res}         42    .5712179     .690197  -1.716828   1.868916

{txt}
{com}. *log close
. 
. 
.  binscatter std_y_pos memb_time, by(party_in) line(none) mcolors(navy forest_green maroon dkorange)
{res}{txt}(3,964 missing values generated)
{res}{txt}
{com}. graph save membtime_ypos, replace
{res}{txt}file {bf:membtime_ypos.gph} saved

{com}.  binscatter std_x_pos memb_time, by(party_in) line(none) mcolors(navy forest_green maroon dkorange)
{res}{txt}(3,964 missing values generated)
{res}{txt}
{com}. graph save membtime_xpos, replace
{res}{txt}file {bf:membtime_xpos.gph} saved

{com}. 
.  binscatter std_y_pos nom_prev, by(party_in) line(none) discrete mcolors(navy forest_green maroon dkorange)
{res}{txt}(3,964 missing values generated)
{res}{txt}
{com}. graph save nomprev_ypos, replace
{res}{txt}file {bf:nomprev_ypos.gph} saved

{com}.  binscatter std_x_pos nom_prev, by(party_in) line(none) discrete mcolors(navy forest_green maroon dkorange)
{res}{txt}(3,964 missing values generated)
{res}{txt}
{com}. graph save nomprev_xpos, replace 
{res}{txt}file {bf:nomprev_xpos.gph} saved

{com}. 
.    graph combine membtime_ypos.gph  membtime_xpos.gph  nomprev_ypos.gph  nomprev_xpos.gph    ///
> , col(2) row(2) scheme(s1mono) ///
>  ysize(16) xsize(20) iscale(.7) 
{res}{txt}
{com}.  graph save Figure_W2, replace
{res}{txt}file {bf:Figure_W2.gph} saved

{com}. 
. *Table W5
. reg x_pos x

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     5,158
{txt}{hline 13}{c +}{hline 34}   F(1, 5156)      = {res}   146.02
{txt}       Model {c |} {res} 44.0805282         1  44.0805282   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 1556.52748     5,156  .301886633   {txt}R-squared       ={res}    0.0275
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0274
{txt}       Total {c |} {res} 1600.60801     5,157  .310375802   {txt}Root MSE        =   {res} .54944

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       x_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}x {c |}{col 14}{res}{space 2} .1990383{col 26}{space 2} .0164716{col 37}{space 1}   12.08{col 46}{space 3}0.000{col 54}{space 4}  .166747{col 67}{space 3} .2313296
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.0423855{col 26}{space 2}  .007824{col 37}{space 1}   -5.42{col 46}{space 3}0.000{col 54}{space 4}-.0577239{col 67}{space 3}-.0270471
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. outreg2 using Table_W5, excel dec(2) se replace 
{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

{com}. 
. foreach var in x stdoffshore_pct sector cap_exec_alt y galtan_pct education sex {c -(}
{txt}  2{com}.         reg x_pos `var'
{txt}  3{com}.         outreg2 using Table_W5, excel dec(2) se append
{txt}  4{com}. {c )-}

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     5,158
{txt}{hline 13}{c +}{hline 34}   F(1, 5156)      = {res}   146.02
{txt}       Model {c |} {res} 44.0805282         1  44.0805282   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 1556.52748     5,156  .301886633   {txt}R-squared       ={res}    0.0275
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0274
{txt}       Total {c |} {res} 1600.60801     5,157  .310375802   {txt}Root MSE        =   {res} .54944

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       x_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}x {c |}{col 14}{res}{space 2} .1990383{col 26}{space 2} .0164716{col 37}{space 1}   12.08{col 46}{space 3}0.000{col 54}{space 4}  .166747{col 67}{space 3} .2313296
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.0423855{col 26}{space 2}  .007824{col 37}{space 1}   -5.42{col 46}{space 3}0.000{col 54}{space 4}-.0577239{col 67}{space 3}-.0270471
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     6,703
{txt}{hline 13}{c +}{hline 34}   F(1, 6701)      = {res}     1.18
{txt}       Model {c |} {res} .364305633         1  .364305633   {txt}Prob > F        ={res}    0.2767
{txt}    Residual {c |} {res} 2063.05197     6,701  .307872253   {txt}R-squared       ={res}    0.0002
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0000
{txt}       Total {c |} {res} 2063.41627     6,702  .307880673   {txt}Root MSE        =   {res} .55486

{txt}{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}          x_pos{col 17}{c |} Coefficient{col 29}  Std. err.{col 41}      t{col 49}   P>|t|{col 57}     [95% con{col 70}f. interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
stdoffshore_pct {c |}{col 17}{res}{space 2} .0131376{col 29}{space 2} .0120773{col 40}{space 1}    1.09{col 49}{space 3}0.277{col 57}{space 4}-.0105377{col 70}{space 3} .0368129
{txt}{space 10}_cons {c |}{col 17}{res}{space 2}-.0485874{col 29}{space 2} .0068359{col 40}{space 1}   -7.11{col 49}{space 3}0.000{col 57}{space 4} -.061988{col 70}{space 3}-.0351868
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     7,072
{txt}{hline 13}{c +}{hline 34}   F(1, 7070)      = {res}    82.30
{txt}       Model {c |} {res} 25.1813471         1  25.1813471   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 2163.26162     7,070  .305977598   {txt}R-squared       ={res}    0.0115
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0114
{txt}       Total {c |} {res} 2188.44296     7,071   .30949554   {txt}Root MSE        =   {res} .55315

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       x_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}sector {c |}{col 14}{res}{space 2} .0636453{col 26}{space 2} .0070157{col 37}{space 1}    9.07{col 46}{space 3}0.000{col 54}{space 4} .0498924{col 67}{space 3} .0773982
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.0238344{col 26}{space 2} .0068088{col 37}{space 1}   -3.50{col 46}{space 3}0.000{col 54}{space 4}-.0371817{col 67}{space 3}-.0104871
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     5,345
{txt}{hline 13}{c +}{hline 34}   F(1, 5343)      = {res}   189.34
{txt}       Model {c |} {res} 57.0485434         1  57.0485434   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 1609.83582     5,343  .301298114   {txt}R-squared       ={res}    0.0342
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0340
{txt}       Total {c |} {res} 1666.88437     5,344  .311916985   {txt}Root MSE        =   {res} .54891

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       x_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
cap_exec_alt {c |}{col 14}{res}{space 2} .1801385{col 26}{space 2} .0130913{col 37}{space 1}   13.76{col 46}{space 3}0.000{col 54}{space 4} .1544742{col 67}{space 3} .2058028
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.0572215{col 26}{space 2} .0075082{col 37}{space 1}   -7.62{col 46}{space 3}0.000{col 54}{space 4}-.0719407{col 67}{space 3}-.0425023
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     6,598
{txt}{hline 13}{c +}{hline 34}   F(1, 6596)      = {res}    15.27
{txt}       Model {c |} {res} 4.68660883         1  4.68660883   {txt}Prob > F        ={res}    0.0001
{txt}    Residual {c |} {res} 2025.06779     6,596  .307014523   {txt}R-squared       ={res}    0.0023
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0022
{txt}       Total {c |} {res}  2029.7544     6,597  .307678399   {txt}Root MSE        =   {res} .55409

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       x_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}y {c |}{col 14}{res}{space 2}-.0544032{col 26}{space 2} .0139243{col 37}{space 1}   -3.91{col 46}{space 3}0.000{col 54}{space 4}-.0816994{col 67}{space 3} -.027107
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.0488161{col 26}{space 2}  .006825{col 37}{space 1}   -7.15{col 46}{space 3}0.000{col 54}{space 4}-.0621953{col 67}{space 3}-.0354369
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     6,600
{txt}{hline 13}{c +}{hline 34}   F(1, 6598)      = {res}    20.39
{txt}       Model {c |} {res} 6.25531317         1  6.25531317   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 2024.64279     6,598  .306857046   {txt}R-squared       ={res}    0.0031
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0029
{txt}       Total {c |} {res}  2030.8981     6,599  .307758464   {txt}Root MSE        =   {res} .55395

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       x_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}galtan_pct {c |}{col 14}{res}{space 2}-.0538301{col 26}{space 2} .0119225{col 37}{space 1}   -4.51{col 46}{space 3}0.000{col 54}{space 4}-.0772021{col 67}{space 3}-.0304581
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.0504252{col 26}{space 2}  .006822{col 37}{space 1}   -7.39{col 46}{space 3}0.000{col 54}{space 4}-.0637985{col 67}{space 3}-.0370519
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     7,412
{txt}{hline 13}{c +}{hline 34}   F(1, 7410)      = {res}    30.81
{txt}       Model {c |} {res} 9.57810707         1  9.57810707   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 2303.90619     7,410  .310918515   {txt}R-squared       ={res}    0.0041
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0040
{txt}       Total {c |} {res}  2313.4843     7,411  .312168979   {txt}Root MSE        =   {res}  .5576

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       x_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 3}education {c |}{col 14}{res}{space 2} .0525037{col 26}{space 2} .0094596{col 37}{space 1}    5.55{col 46}{space 3}0.000{col 54}{space 4} .0339602{col 67}{space 3} .0710473
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.0482914{col 26}{space 2} .0068373{col 37}{space 1}   -7.06{col 46}{space 3}0.000{col 54}{space 4}-.0616944{col 67}{space 3}-.0348884
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     7,417
{txt}{hline 13}{c +}{hline 34}   F(1, 7415)      = {res}    63.86
{txt}       Model {c |} {res} 19.7680142         1  19.7680142   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 2295.19801     7,415  .309534458   {txt}R-squared       ={res}    0.0085
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0084
{txt}       Total {c |} {res} 2314.96602     7,416  .312158309   {txt}Root MSE        =   {res} .55636

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       x_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}sex {c |}{col 14}{res}{space 2}-.0522478{col 26}{space 2} .0065379{col 37}{space 1}   -7.99{col 46}{space 3}0.000{col 54}{space 4} -.065064{col 67}{space 3}-.0394316
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.0439281{col 26}{space 2} .0065379{col 37}{space 1}   -6.72{col 46}{space 3}0.000{col 54}{space 4}-.0567443{col 67}{space 3}-.0311119
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

{com}. 
. foreach var in x stdoffshore_pct sector cap_exec_alt y galtan_pct education sex {c -(}
{txt}  2{com}.         reg y_pos `var'
{txt}  3{com}.         outreg2 using Table_W5, excel dec(2) se append
{txt}  4{com}. {c )-}

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     5,078
{txt}{hline 13}{c +}{hline 34}   F(1, 5076)      = {res}    69.36
{txt}       Model {c |} {res} 11.5458633         1  11.5458633   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 845.010673     5,076  .166471764   {txt}R-squared       ={res}    0.0135
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0133
{txt}       Total {c |} {res} 856.556536     5,077  .168713125   {txt}Root MSE        =   {res} .40801

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       y_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}x {c |}{col 14}{res}{space 2}-.1028853{col 26}{space 2} .0123541{col 37}{space 1}   -8.33{col 46}{space 3}0.000{col 54}{space 4}-.1271046{col 67}{space 3}-.0786659
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3666098{col 26}{space 2}  .005856{col 37}{space 1}   62.60{col 46}{space 3}0.000{col 54}{space 4} .3551295{col 67}{space 3}   .37809
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     6,600
{txt}{hline 13}{c +}{hline 34}   F(1, 6598)      = {res}     0.09
{txt}       Model {c |} {res}  .01497111         1   .01497111   {txt}Prob > F        ={res}    0.7689
{txt}    Residual {c |} {res} 1144.56776     6,598  .173471925   {txt}R-squared       ={res}    0.0000
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}   -0.0001
{txt}       Total {c |} {res} 1144.58273     6,599  .173447906   {txt}Root MSE        =   {res}  .4165

{txt}{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}          y_pos{col 17}{c |} Coefficient{col 29}  Std. err.{col 41}      t{col 49}   P>|t|{col 57}     [95% con{col 70}f. interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
stdoffshore_pct {c |}{col 17}{res}{space 2} .0026856{col 29}{space 2} .0091418{col 40}{space 1}    0.29{col 49}{space 3}0.769{col 57}{space 4}-.0152353{col 70}{space 3} .0206065
{txt}{space 10}_cons {c |}{col 17}{res}{space 2} .3547524{col 29}{space 2} .0051681{col 40}{space 1}   68.64{col 49}{space 3}0.000{col 57}{space 4} .3446211{col 70}{space 3} .3648836
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     6,964
{txt}{hline 13}{c +}{hline 34}   F(1, 6962)      = {res}   136.83
{txt}       Model {c |} {res} 23.5557017         1  23.5557017   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 1198.53042     6,962  .172153177   {txt}R-squared       ={res}    0.0193
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0191
{txt}       Total {c |} {res} 1222.08612     6,963  .175511435   {txt}Root MSE        =   {res} .41491

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       y_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}sector {c |}{col 14}{res}{space 2}-.0621157{col 26}{space 2} .0053102{col 37}{space 1}  -11.70{col 46}{space 3}0.000{col 54}{space 4}-.0725253{col 67}{space 3}-.0517061
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3334479{col 26}{space 2} .0051523{col 37}{space 1}   64.72{col 46}{space 3}0.000{col 54}{space 4} .3233478{col 67}{space 3}  .343548
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     5,263
{txt}{hline 13}{c +}{hline 34}   F(1, 5261)      = {res}     2.47
{txt}       Model {c |} {res} .417963121         1  .417963121   {txt}Prob > F        ={res}    0.1164
{txt}    Residual {c |} {res} 891.565251     5,261  .169466879   {txt}R-squared       ={res}    0.0005
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0003
{txt}       Total {c |} {res} 891.983214     5,262  .169514104   {txt}Root MSE        =   {res} .41166

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       y_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
cap_exec_alt {c |}{col 14}{res}{space 2}-.0155921{col 26}{space 2} .0099284{col 37}{space 1}   -1.57{col 46}{space 3}0.116{col 54}{space 4}-.0350558{col 67}{space 3} .0038716
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3755612{col 26}{space 2} .0056748{col 37}{space 1}   66.18{col 46}{space 3}0.000{col 54}{space 4} .3644363{col 67}{space 3} .3866861
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     6,496
{txt}{hline 13}{c +}{hline 34}   F(1, 6494)      = {res}   407.55
{txt}       Model {c |} {res} 66.7953873         1  66.7953873   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 1064.34389     6,494  .163896503   {txt}R-squared       ={res}    0.0591
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0589
{txt}       Total {c |} {res} 1131.13928     6,495  .174155393   {txt}Root MSE        =   {res} .40484

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       y_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}y {c |}{col 14}{res}{space 2} .2072021{col 26}{space 2} .0102637{col 37}{space 1}   20.19{col 46}{space 3}0.000{col 54}{space 4} .1870818{col 67}{space 3} .2273224
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3504038{col 26}{space 2} .0050254{col 37}{space 1}   69.73{col 46}{space 3}0.000{col 54}{space 4} .3405525{col 67}{space 3} .3602552
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     6,498
{txt}{hline 13}{c +}{hline 34}   F(1, 6496)      = {res}    83.20
{txt}       Model {c |} {res} 14.3236841         1  14.3236841   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res}  1118.3515     6,496  .172160022   {txt}R-squared       ={res}    0.0126
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0125
{txt}       Total {c |} {res} 1132.67518     6,497  .174338185   {txt}Root MSE        =   {res} .41492

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       y_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}galtan_pct {c |}{col 14}{res}{space 2} .0822558{col 26}{space 2} .0090179{col 37}{space 1}    9.12{col 46}{space 3}0.000{col 54}{space 4} .0645778{col 67}{space 3} .0999339
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3549062{col 26}{space 2} .0051504{col 37}{space 1}   68.91{col 46}{space 3}0.000{col 54}{space 4} .3448098{col 67}{space 3} .3650026
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     7,294
{txt}{hline 13}{c +}{hline 34}   F(1, 7292)      = {res}   264.30
{txt}       Model {c |} {res} 46.2293479         1  46.2293479   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 1275.48268     7,292  .174915343   {txt}R-squared       ={res}    0.0350
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0348
{txt}       Total {c |} {res} 1321.71203     7,293  .181230225   {txt}Root MSE        =   {res} .41823

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       y_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 3}education {c |}{col 14}{res}{space 2} .1163427{col 26}{space 2} .0071564{col 37}{space 1}   16.26{col 46}{space 3}0.000{col 54}{space 4} .1023141{col 67}{space 3} .1303714
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3124532{col 26}{space 2} .0051773{col 37}{space 1}   60.35{col 46}{space 3}0.000{col 54}{space 4} .3023042{col 67}{space 3} .3226023
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

      Source {c |}       SS           df       MS      Number of obs   ={res}     7,299
{txt}{hline 13}{c +}{hline 34}   F(1, 7297)      = {res}   396.39
{txt}       Model {c |} {res} 68.2052917         1  68.2052917   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 1255.56641     7,297  .172066111   {txt}R-squared       ={res}    0.0515
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.0514
{txt}       Total {c |} {res} 1323.77171     7,298  .181388285   {txt}Root MSE        =   {res} .41481

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       y_pos{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}sex {c |}{col 14}{res}{space 2} .0978743{col 26}{space 2} .0049159{col 37}{space 1}   19.91{col 46}{space 3}0.000{col 54}{space 4} .0882376{col 67}{space 3}  .107511
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .3550172{col 26}{space 2} .0049159{col 37}{space 1}   72.22{col 46}{space 3}0.000{col 54}{space 4} .3453805{col 67}{space 3} .3646539
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}{browse `"Table_W5.xml"'}
{browse `"\\micro.intra\Projekt\P0934$\P0934_Gem\Do Files\Kitschelt\Submission"' :dir}{com} : {txt}{stata `"seeout using "Table_W5.txt""':seeout}

{com}. 
. 
. preserve
{txt}
{com}. gen count=1
{txt}
{com}. 
. keep if gr_y_pos_8!=. & gr_x_pos_8!=.
{txt}(5,546 observations deleted)

{com}. collapse(sum) count, by(gr_y_pos_8 gr_x_pos_8 parti_initial)
{res}{txt}
{com}. bysort parti_initial: egen parti_count=sum(count)
{txt}
{com}. 
. gen share= count/parti_count
{txt}
{com}. sum share

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}share {c |}{res}        203    .0246305    .0355123   .0003798   .2041667
{txt}
{com}. gen percent=round(share*1000)/10
{txt}
{com}. 
. twoway (scatter gr_y gr_x [fweight = share] if parti_initial=="B", mcolor(gold) mfcolor(none) msize(small) msymbol(circle)) ///
>   (scatter gr_y gr_x  if parti_initial=="B" &percent>=1, mcolor(black)  mlabcolor(black)  msymbol(none) mlabel(percent) mlabposition(0)) ///
>   , scheme(s1color) xline(0, lpattern(dash) lcolor(black)) yline(0, lpattern(dash) lcolor(black))  title(Sweden Democrats) ytitle( Authoritarian-Libertarian) xtitle(Left-Right) legend(off) ysize(5) xsize(5.5)
{res}{txt}
{com}. graph save lab_circle_B, replace
{res}{txt}file {bf:lab_circle_B.gph} saved

{com}.   twoway (scatter gr_y gr_x [fweight = share] if parti_initial=="G", mcolor(forest_green) mfcolor(none) msize(small) msymbol(circle)) ///
>   (scatter gr_y gr_x  if parti_initial=="G" &percent>=1, mcolor(black)  mlabcolor(black)  msymbol(none) mlabel(percent) mlabposition(0)) ///
>   , scheme(s1color) xline(0, lpattern(dash) lcolor(black)) yline(0, lpattern(dash) lcolor(black))  title(Green Party) ytitle( Authoritarian-Libertarian) xtitle(Left-Right) legend(off) ysize(5) xsize(5.5)
{res}{txt}
{com}. graph save lab_circle_G, replace
{res}{txt}file {bf:lab_circle_G.gph} saved

{com}.   twoway (scatter gr_y gr_x [fweight = share] if parti_initial=="M", mcolor(navy) mfcolor(none) msize(small) msymbol(circle)) ///
>   (scatter gr_y gr_x  if parti_initial=="M" &percent>=1, mcolor(black)  mlabcolor(black)  msymbol(none) mlabel(percent) mlabposition(0)) ///
>   , scheme(s1color) xline(0, lpattern(dash) lcolor(black)) yline(0, lpattern(dash) lcolor(black))  title(Conservatives) ytitle( Authoritarian-Libertarian) xtitle(Left-Right) legend(off) ysize(5) xsize(5.5)
{res}{txt}
{com}. graph save lab_circle_M, replace
{res}{txt}file {bf:lab_circle_M.gph} saved

{com}.   twoway (scatter gr_y gr_x [fweight = share] if parti_initial=="S", mcolor(cranberry) mfcolor(none) msize(small) msymbol(circle)) ///
>   (scatter gr_y gr_x  if parti_initial=="S" & percent>=1, mcolor(black)  mlabcolor(black)  msymbol(none) mlabel(percent) mlabposition(0)) ///
>   , scheme(s1color) xline(0, lpattern(dash) lcolor(black)) yline(0, lpattern(dash) lcolor(black))  title(Social Democrats) ytitle( Authoritarian-Libertarian) xtitle(Left-Right) legend(off) ysize(5) xsize(5.5)
{res}{txt}
{com}. 
. graph save lab_circle_S, replace
{res}{txt}file {bf:lab_circle_S.gph} saved

{com}.  
.    graph combine  lab_circle_G.gph  lab_circle_B.gph  lab_circle_S.gph  lab_circle_M.gph ///
> , col(2) row(2) scheme(s1mono) ysize(16) xsize(20) iscale(.7)  ycommon xcommon
{res}{txt}
{com}.  
.   graph save Figure_W3, replace
{res}{txt}file {bf:Figure_W3.gph} saved

{com}.   
. restore
{txt}
{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}\\micro.intra\Projekt\P0934$\P0934_Gem\Data Files\Kolfu.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}16 Jan 2024, 14:10:43
{txt}{.-}
{smcl}
{txt}{sf}{ul off}